AngularStrap tooltip disables my custom directive

最后都变了- 提交于 2020-01-13 18:29:10

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!