AngularStrap提示禁用我的自定义指令 [英] AngularStrap tooltip disables my custom directive

查看:165
本文介绍了AngularStrap提示禁用我的自定义指令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想获得的BS-提示AngularStrap指令与被称为checkStrength,它会检查密码的强度自己的自定义指令工作。当单独使用这两种指令,它们做工精细,但他们不会一起工作。

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.

是与BS-提示一个plunker。工具提示工作正常,但我自定义checkStrength指令不工作。

This is a plunker with the bs-tooltip. The tooltip works fine but my custom "checkStrength" directive does not work.

是没有BS-提示一个plunker。在这种情况下,checkStrength指令工作正常。

This is a plunker without the bs-tooltip. In this case the "checkStrength" directive works fine.

我在做什么错了?

推荐答案

在您输入元素,你必须使用以下内容:

On your input element you have to use the following:

ng-model="$parent.pw"

BS-提示元素与其绑定上创建一个孤立的范围。

bs-tooltip creates an isolated scope on the element its bound to.

工作实例: Plunker

Working Example: Plunker

这篇关于AngularStrap提示禁用我的自定义指令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆