angular 神坑 ,回调函数无法被监视
原方法,使用一个confirm 点ok然后回调,结果 界面无法刷新,搜索了下 是因为$scope没有监视model,必须使用apply方法
$scope.SelectedRow=row;
negAlert.confirm(function(){
delCell();//数据已经被删除 但是界面没有刷新
},"Are you sure to remove this row?",false);
改为以下就ok了
$scope.SelectedRow=row;
negAlert.confirm(function(){
$scope.$apply(delCell);
},"Are you sure to remove this row?",false);
引用:http://www.jb51.net/article/59538.htm

浙公网安备 33010602011771号