Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.
Pawel Kozlowski edited this page Jul 29, 2013 · 11 revisions

My input / select element doesn't work as expected inside the tab / accordion directive

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:

My input elements stop working when I place a tooltip / popover on it

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">
Clone this wiki locally