Tagged Questions
6
votes
1answer
5k views
AngularJS Directive not able to access isolate scope objects
I am trying to put some default values in my directive with Isolate scope. Basically, I need to do some DOM manipulations using the scope object when my directive is bound. Below is my code:
...
5
votes
2answers
5k views
AngularJS: open a new browser window, yet still retain scope and controller, and services
I'm writing an angularJS app. In this particular controller, I open a new browser window through the $window.open service. But in the new window, all the $scope variables are lost.
I tried to use ...
8
votes
3answers
3k views
AngularJS, is this way of using service good?
i've this HTML:
<p>Hello {{name}}</p>
and the controller is:
function myCtrl(scope, service) {
scope.name = service.getUsername(); // service.getUsername() return "World!"
}
...
1
vote
1answer
2k views
AngularJS: service query returning zero result
my app.js looks like
var app = angular.module('pennytracker', [
'$strap.directives',
'ngCookies',
'categoryServices'
]);
app.config(function($routeProvider) {
console.log('configuring ...
6
votes
1answer
3k views
AngularJS factory property isn't being updated in $scope when not using push()
I have a factory that is retrieving the data from an external source. As soon as i get the data, i use a second factory to filter it by a certain criteria.
The factory property is assigned to scope.
...
0
votes
1answer
2k views
AngularJS share asynchronous service data between controllers
I know this issue has been asked several times in stackoverflow, but I couldn't find a proper answer.
What I need to achieve is to be able to initiate some asynchronous call in one controller and ...
1
vote
2answers
35 views
In my service-factory I lookup up a large dataset - I want to persist it and check for its existence to avoid calling it again
My service (factory) makes an API call and assigns response data to a variable:
.factory('MedicationMatchingNamesFactory',
['$http', '$q', 'MedicationDisplayNamesFactory',
...
1
vote
1answer
406 views
AngularJS - AlertFactory open dialog behavior
i'm creating an AlertFactory because ui.bootstrap.dialog doesn't works in my app.
So i type follow code: http://jsfiddle.net/Premier/BHqKB/17/
enter code here
It works very well if you click on ...
0
votes
1answer
195 views
ngModel' deep objects creation mechanism
I want to use angular' mechanism for deep property nesting , something that ng-model directive is using. I mean we can create very "deep" object in a scope by writing : ...
0
votes
3answers
3k views
$watch not working on variable from other controller?
I have one controller which displays a checklist, and stores the selection in an array.
My other controller runs an $http.get on the array from the first controller.
How do I set a $watch so that ...