http://ionicframework.com/blog/angularjs-console/

1: Access Scopes

We can access any scope (even isolated ones!) on the page with a simple JS one-liner:

> angular.element(targetNode).scope()
-> ChildScope {$id: "005", this: ChildScope, $$listeners: Object, $$listenerCount: Object, $parent: Scope}

Or for isolated scopes:

> angular.element(targetNode).isolateScope()
-> Scope {$id: "009", $$childTail: ChildScope, $$childHead: ChildScope, $$prevSibling: ChildScope, $$nextSibling: Scope}

Where targetNode is a reference to an HTML Node. You can grab one easily using document.querySelector().

相关文章:

  • 2021-12-21
  • 2022-01-13
  • 2021-05-12
  • 2021-12-31
  • 2021-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-04
猜你喜欢
  • 2021-12-11
  • 2022-03-04
  • 2021-11-19
  • 2022-02-26
  • 2022-12-23
  • 2022-03-02
相关资源
相似解决方案