How to access $scope variable in angular from chrome console

后端 未结 4 1771
日久生厌
日久生厌 2021-01-30 20:18

How to access the scope variable widgets from chrome\'s console

function MyCntrl($scope) {
    $scope.widgets = [
        {text:\'Widget #1\', datarow:1, dataco         


        
4条回答
  •  一整个雨季
    2021-01-30 21:00

    You can either follow the asnwer of Will or install Angular Batarang Chrome extension. This will not only allow you to view and manipulate '$scope' object from, let's say your JavaScript console, but also it's a fundamental tool when developing complex AngularJS apps.

提交回复
热议问题