In AngularJS, a scope is an object that refers to the application model. It is an execution context for expressions.

learn more… | top users | synonyms

19
votes
3answers
905 views

When writing a directive, how do I decide if a need no new scope, a new child scope, or a new isolate scope?

I'm looking for some guidelines that one can use to help determine which type of scope to use when writing a new directive. Ideally, I'd like something similar to a flowchart that walks me though a ...
0
votes
2answers
376 views

What is the difference between '@' and '=' in directive scope

I've read the AngularJS documentation on the topic carefully, and then fiddled around with a directive. Here's the fiddle. And here are some relevant snippets: from the html: <pane ...
0
votes
5answers
345 views

AngularJS controller inheritance

AngularJS has a DOM based controller inheritance, as mentioned in the angular Docs. <div ng-controller="BaseController"> <p>Base Controller Value: {{value}}</p> <button ...
0
votes
1answer
90 views

Angular.js filters and functions on scope that is changing every second

The problem. I have a table of entries($scope.entries), each row(ng-repeat) with 5 columns, 2 of those columns have custom made filter for various transformations. Now in the same scope I have ...
0
votes
1answer
76 views

Bind ngInclude to different models

Is it possible to specify model for ngInclude so that any changes done inside the included template are reflected on the specified model. For instance: I have a model such as : $scope.member = { ...
0
votes
0answers
329 views

AngularJS - directive scope not setting ng-class on element

Plunker I have a table of data: <table class="table table-hover" ng-class="dndElemClass" drag-and-drop> ... </table> My goal is to give the table a drop shadow by assigning ...
1
vote
1answer
74 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 ...
1
vote
1answer
169 views

Isolate scope attributes defined with @ are undefined/disappear in directive's link function

The directive has isolate scope, and the scope attributes are being passed with "@". This is how the directive is called: <div ng-init="classForIcon = 'vladClass'"></div> <div ...
1
vote
1answer
99 views

Why formatters does not work with isolated scope?

Why formatters does not work with isolated scope? Is this angular bug or I am doing something wrong? This contains isolates scope and does not work: http://jsfiddle.net/YbdXQ/56/ restrict: 'A', ...
0
votes
2answers
57 views

Call Angular controller from script onload

I am trying to update the state of my controller after loading of a script from onload callback. I load the Google Client API: <script ...
0
votes
1answer
77 views

How can I inherit complex properties from the parent scope into my directive's isolated scope

After reviewing AngularJS (and related) documentation and other stackoverflow questions regarding isolated scopes within directives, I'm still a little confused. Why can't I do a bi-directional ...
0
votes
2answers
171 views

angular.js - evalAsync not called

on the following jsFiddle i demonstrate a problem that makes me ponder. It stems from the need to send a system wide event to all scopes, telling them that the system has finished bootstrapping. In ...