How do I access the $scope variable in browser's console using AngularJS?

前端 未结 19 1260
渐次进展
渐次进展 2020-11-22 08:35

I would like to access my $scope variable in Chrome\'s JavaScript console. How do I do that?

I can neither see $scope nor the name of my mo

相关标签:
19条回答
  • 2020-11-22 09:05

    Inspect the element, then use this in the console

    s = $($0).scope()
    // `s` is the scope object if it exists
    
    0 讨论(0)
提交回复
热议问题