0
我使用角度ui作为模式,当我按下它时,它进入我指定的数组,但它不会立即更新它应该,我仍然必须刷新页面AngularJS不会立即更新当我推入Modal
<button class="btn btn-regular mustard-lighten-1 white-text" ng-click="showModal()"><span class="material-icons">add</span></button>
$scope.showModal =() => {
let modalInstance = $uibModal.open({
animated: true,
templateUrl: 'pages/modals/add-modal.html',
controller: 'homeController'
})
} // show modal on the overview page
$scope.addRule =() => {
$scope.rules.push({
// properties inside here
})
你的意思是里面插入我的 “addRule” 功能的其他功能? – BlackenedRed
是的。它将更新Scope中的视图。 –
它会引发错误“错误:[$ rootScope:inprog] $ apply already progress in progress” – BlackenedRed