国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

angular.js - Can angular applications directly obtain elements in html and pass them into functions as parameters?
過去多啦不再A夢
過去多啦不再A夢 2017-05-15 17:03:04
0
1
595

Angular application, how can I use jquery directly in html to obtain elements and pass them into functions as parameters?

<button ng-click="vm.getButton($(this))"></button>
var ctrl = this;
ctrl.getButton = (elem) => {
    console.log(elem);
};
The

in the this function directly points to the current scope, and the element cannot be obtained. Is there any solution?

過去多啦不再A夢
過去多啦不再A夢

reply all(1)
世界只因有你

Currently, the requirements are implemented through the following methods

<button ng-click="vm.getButton($event)"></button>
var ctrl = this;
ctrl.getButton = ($event) => {
    console.log($($event.currentTarget));
};
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template