Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试让 bs-tooltip AngularStrap 指令与我自己的名为“checkStrength”的自定义指令一起检查密码的强度。单独使用这些指令中的任何一个时,它们都可以正常工作,但不能一起使用。
这是一个带有 bs-tooltip 的插件。工具提示工作正常,但我的自定义“checkStrength”指令不起作用。
这是一个没有 bs-tooltip 的 plunker。在这种情况下,“checkStrength”指令可以正常工作。
我究竟做错了什么?
在您的输入元素上,您必须使用以下内容:
ng-model="$parent.pw"
bs-tooltip 在其绑定的元素上创建一个隔离范围。
工作示例:Plunker