【发布时间】:2015-12-09 10:37:49
【问题描述】:
我刚刚在 Vue.js 中发现了 v-el 指令,它对 DOM 操作非常方便。
F.ex.我可以用它标记一个元素:
<button v-el="getCustomerButton">Get customers</button>
并且在 vue 组件中使用例如 this.$$.getCustomerButton.focus() 来聚焦按钮。
angularjs中有没有和v-el等价的东西?
问候,尼尔斯。
【问题讨论】: