-
Notifications
You must be signed in to change notification settings - Fork 6.7k
FAQ
This is a scoping issue. Many directives from this repository are creating a new scope. This means that your ngModel
binding gets evaluated in the context of a new, child scope, and not in the context of an original scope. As a quick rule of thumb you should always have a dot as part of your ngModel
expression. In depth discussion of the topic can be found here:
- https://github.com/angular/angular.js/wiki/Understanding-Scopes
- http://www.youtube.com/watch?v=DTx23w4z6Kc
This is a scoping issue. In the current version of AngularJS each DOM element can have one and only one scope. In other words each directive placed on a given DOM element are evaluated against one scope. Both tooltip and popover are creating a new scope so placing them on an input make the ngModel
to be evaluated in the context of a new scope created by a tooltip / popover.
Currently the best option of working around this problem is to prefix an expression inside the ngModel
with a parent scope, ex:
<input type="text" tooltip="Tooltip on foo" ng-model="$parent.fooModel">