问题
I am trying to get the bs-tooltip AngularStrap directive to work with my own custom directive called "checkStrength" which checks the strength of a password. When using either of these directives alone, they work fine, but they won't work together.
This is a plunker with the bs-tooltip. The tooltip works fine but my custom "checkStrength" directive does not work.
This is a plunker without the bs-tooltip. In this case the "checkStrength" directive works fine.
What am I doing wrong?
回答1:
On your input element you have to use the following:
ng-model="$parent.pw"
bs-tooltip creates an isolated scope on the element its bound to.
Working Example: Plunker
来源:https://stackoverflow.com/questions/21126071/angularstrap-tooltip-disables-my-custom-directive