Using Angular, you can actually access the scope and other things from the console, so when you have a live web page, you can dive in and grab things out of the scope and modify them and what not.

 

$0 is a shortcut for the selected element in your elements.

[AngularJS] Accessing Scope from The Console

 

Then you can get the socpe by using:

var $scope = angular.element($0).scope();

 

Can use this $scope to change ng-Model's value, to get controller...or whatever.

Even you use controller as sytnx,  you still can get by 

  $scope.myController

 

After you change the value, use:

$scope.$apply();

 

相关文章:

  • 2021-05-17
  • 2021-08-07
  • 2021-10-24
  • 2022-01-19
  • 2022-02-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-21
  • 2022-12-23
  • 2022-12-23
  • 2021-12-16
  • 2022-01-09
  • 2021-05-12
  • 2021-09-07
相关资源
相似解决方案