0
我有一个需要密码的模式窗口。如果输入的是空的话就不会有错误,我要显示工具提示时有错误AngularJS Tooltip tooltip-is-open not working
<input type='password' class='form-control' id='password' ng-model='user.password' uib-tooltip='{{error_msg}}' tooltip-placement='right' tooltip-trigger='none' tooltip-is-open='true' tooltip-class='tooltip_error' tooltip-enable='{{error}}' autofocus>
目前的情况是,如果没有错误,则提示不显示在所有。一旦出现错误,它将显示错误消息,但我必须将鼠标悬停在文本框上以显示工具提示。与此同时,我已将tooltip-is-open
设置为true
以对其进行测试,但目前无法使用。
任何想法?
当我删除了'{}',它只是打印出“ERROR_MSG”,但布尔结果为'提示,enable'不工作,因为它应该。 –
@ J.Do:您必须将'error_msg'作为$ scope属性,例如像'$ scope.error_msg =“密码中的错误'' – anoop
是的,这就是我以前的样子,但它只在用{{} '。我仍然需要将鼠标悬停在文本框上以显示工具提示。 –