最佳答案
选项1:直接在chrome devtools中@H_403_2@
>像这样捕获范围:@H_403_2@
var scope = angular.element(document.getElementById(‘#btnMainMenu’)).scope();
>像这样访问对象(假设此视图的控制器是myCtrl):@H_403_2@
scope.myCtrl.CoursesVm@H_403_2@
您可以将代码包含在控制器函数内的ng-if((!CoursesVm.showcheckBoxes ||(CoursesVm.tabSelected ==’current’)))中,然后调试该函数.@H_403_2@
像这样的东西:@H_403_2@
@H_403_2@
//...controller
function checkIf(){
debugger; //open chrome devtools and go to the view...code execution will stop here!
//..code to be checked
}