当我专注于输入文本时打开角度弹出窗口

时间:2017-03-17 18:12:23

标签: angularjs html5

我的html页面中有一小段代码

<div class="input-group">
    <input type="text" class="form-control" name="telefono" id="field_telefono" ng-model="vm.indirizzo.telefono" telefono required/>
    <span class="input-group-addon" role="button" uib-popover="{{'theFoodApp.indirizzo.informativa' | translate}}" data-popover-title="{{'theFoodApp.indirizzo.informativa-title' | translate}}" data-popover-placement="top" data-popover-append-to-body="true">
    <span class="glyphicon glyphicon-question-sign white"></span>
    </span>
</div>

当我专注于输入文本时,是否可以打开uib-popover?

1 个答案:

答案 0 :(得分:0)

popover-trigger="'focus'" 

您还可以使用ng-focus和ng-blur指令来触发传递给popover-is-open =&#34;&#34;的切换变量。