I've be looking for how to execute this but I can't find anything related so far, :( I could nest both functions yes but I'm just wondering if this is possible? I'd like to do this literally:(我一直在寻找如何执行此操作,但到目前为止我还没有找到任何相关的东西,:(我可以嵌套两个函数,但是我只是想知道这是否可能吗?)
<td><button class="btn" ng-click="edit($index) open()">Open me!</button></td>
My JS code at the moment:(目前我的JS代码:)
$scope.open = function () {
$scope.shouldBeOpen = true;
};
$scope.edit = function(index){
var content_1, content_2;
content_1 = $scope.people[index].name;
content_2 = $scope.people[index].age;
console.log(content_1);
};
I'd like to call two functions with just one click, how can I do this in angularJS?(我想一键调用两个函数,如何在angularJS中做到这一点?) I thought it'd be straight forward like in CSS when you add multiple classes...but it's not :((我认为当您添加多个类时,它将像在CSS中一样简单...但是不是:()
ask by YoniGeek translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…