我已经制作了一个有角度的模态,它弹出很棒,但退出按钮不会触发关闭模态。如果重新点击要打开的按钮,但是在模态内添加新按钮不会触发该功能,则它可以工作。顺便说一句,这里没有引导程序。
var ar = [{"STU":"Study1","SUB":"Subject1","EXL":"Yes"},{"STU":"Study1","SUB":"Subject1","EXL":"Yes"},{"STU":"Study2","SUB":"Subject1","EXL":"Yes"},{"STU":"Study3","SUB":"Subject1","EXL":"Yes"},{"STU":"Study1","SUB":"Subject1","EXL":"Yes"},{"STU":"Study3","SUB":"Subject1","EXL":"Yes"},{"STU":"Study3","SUB":"Subject1","EXL":"Yes"},{"STU":"Study2","SUB":"Subject1","EXL":"Yes"}]
var result = [];
ar.forEach(function(e) {
if(!this[e.STU]) {
this[e.STU] = {STU: e.STU, SUB : 0, EXL : e.EXL}
result.push(this[e.STU]);
}
this[e.STU].SUB++;
}, {});
console.log(result)
答案 0 :(得分:0)
正确的代码将是:
1. Set $scope.showMenu = true in the callback which called when popup is opened.
2. $scope.modalFunc= function(){
$scope.showMenu = !$scope.showMenu;
...
}
3. Remove $scope.showMenu=false; since it is not needed.