0
debugInfoEnabledが無効の場合、$scope
をangular.element()
から取得する方法があります。debugInfoをオフにしてangle.elementからスコープを取得する方法
angular.element(document.querySelector('some-cool-element')).scope() // Undefined
debugInfoEnabledが無効の場合、$scope
をangular.element()
から取得する方法があります。debugInfoをオフにしてangle.elementからスコープを取得する方法
angular.element(document.querySelector('some-cool-element')).scope() // Undefined
angular.element($ 0).scope()
これは、この1
How do I access the $scope variable in browser's console using AngularJS?
.scope()はdebugInfoが有効な場合に便利です。私はそのオプションを無効にしている –
質問は何であるの重複質問はありますか? –
[AngularJSを使用してブラウザのコンソールで$ scope変数にアクセスするにはどうすればよいですか?](https://stackoverflow.com/questions/13743058/how-do-i-access-the-scope-variable-in-browsers -console-using-anglesjs) – JanS
要素から現在のスコープを取得する必要がありますが、debugInfoを無効にしています... .scopeが機能しません –