更新时间:2022-12-02 20:05:17
如果您不介意不使用 ng-click
,它可以正常工作.您可以将其重命名为其他名称并仍然读取该属性,同时避免点击处理程序被触发两次目前存在的问题.
If you don't mind not using ng-click
, it works OK. You can just rename it to something else and still read the attribute, while avoiding the click handler being triggered twice problem there is at the moment.
http://plnkr.co/edit/YWr6o2?p=preview
我认为问题在于 terminal
指示其他指令不要运行.{{ }}
的数据绑定只是 ng-bind
指令的别名,大概被 terminal
取消了.
I think the problem is terminal
instructs other directives not to run. Data-binding with {{ }}
is just an alias for the ng-bind
directive, which is presumably cancelled by terminal
.