All Questions
69 questions
0
votes
1
answer
153
views
AngularJS is it possible to use service that was injected via html scope directly?
I have this directive:
app.directive("saveButton", ($rootScope, ConfirmationModal) => {
return {
templateUrl: "/structure/header/components/save-button/save-button.html",
scope: true,
...
0
votes
3
answers
61
views
Re-Usable Angularjs Code
I have scope function ClickA and ClickB in my controller CtrlA, I want to re-use ClickA and ClickB with there containing scope variables "a" and "b" in almost every other controllers, I mean, I simply ...
1
vote
2
answers
135
views
Why won't $compile work with service using a directive?
Please have a look at this example, since it is the best way to explain the problem.
In this example if you click the directive link, it does not compile the template, but instead displays it as "{{...
0
votes
1
answer
249
views
How to Handle multiple Ajax call calling same function?
Hi have 4 directives on the page, all directive require list of user.
User List is stored in database which require hhtp request.
As 4 directive are on the page at same time so 4 different ajax call ...
6
votes
1
answer
9k
views
What is the calling order of angularjs functions (config/run/controller)? [duplicate]
There are
controllers
constants
directives
services
factory
run
config
filters
functions of angular.js. What is the calling order of all these modules?
0
votes
1
answer
1k
views
Calling multiple REST APIs using response of first API in AngularJS
I am new to AngularJS and trying to make an application which loads data by calling APIs. It is like I am fetching the list of boxes of type A (Resource Groups) and then each Box of type A has ...
1
vote
2
answers
424
views
Argument 'AppCtrl' is not a function, got undefined, can't seem to fix
This is my angularApp.js:
var app = angular.module('intuo', ['ui.router','ngMaterial', 'ngAnimate']);
app.config(['$stateProvider', '$urlRouterProvider',
function($stateProvider, $urlRouterProvider) ...
0
votes
2
answers
1k
views
Angularjs service method not getting called, TypeError: Cannot read property '
I am new to angularJs.
I am havin problem in calling a method from service.
Here is my controller (app.js)
angular.module('starter', ['ionic','ngCordova','NameService'])
.run(function($...
0
votes
1
answer
81
views
How to watch a variable in a Service from a Controller to open a modal?
http://plnkr.co/edit/bdHiU0?p=preview
If the variable I need is some data that the service returns I'm fine, something like this will work:
vm.tickersObject = InitTickersFactory.returnTickers();
...
4
votes
1
answer
241
views
AngularJS: Bind a directive to a Controller via a Service update
How to bind a directive to a controller via a service update ?
I want to create the possibility to update a cart(the service) via a directive(add to cart button) and then the controller (that display ...
0
votes
1
answer
87
views
Use service function in directive in angularjs [duplicate]
I want to call service function from directive's controller. The service name is Auth and function name is Auth.logout. I already injected service in directive's controller but not working. Please let ...
1
vote
0
answers
379
views
angularjs access link function of directive from external controller
i have two ng-include in a template, but similar:
<ng-include ng-controller="ctrTable" src="modal.html"></ng-include>
<ng-include ng-controller="ctrButton" src="modal2.html"></...
4
votes
2
answers
10k
views
Populate table data with $http.get on dropdown option selected in Angular
I am new to Angular and would like to learn how to accomplish this task below:
I have a dropdown that contains a list of table names from a database. When a table name is selected from the drop down ...
1
vote
2
answers
129
views
$http get not refreshing result
I am Trying to do some examples with angularJS:
Html:
<html ng-app="myApp">
<body ng-controller="JokesController">
<h1>{{ joke }}<h1>
</body>
</html&...
3
votes
1
answer
484
views
Pass JSON object from Angular service to directive
I'm trying to pass a JSON object from an Angular service to a directive. Actually I just want to $compile a directive on-the-go and pass an object to the directive.
It should look something like this:...