Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 101387a

Browse files
committed
query scope method by selector
1 parent 47e1022 commit 101387a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎ng-profile-scope-method.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
where $scope could be determined from element 'my-selector'
99
*/
1010
(function profileScopeMethod() {
11-
var selector = 'find';
11+
var selector = '#find';
1212
var methodName = 'find';
1313
var name = selector + ':' + methodName;
1414

1515
/* global angular */
16-
var el = angular.element(document.getElementById(selector));
16+
var el = angular.element(document.querySelector(selector));
1717
var scope = el.scope() || el.isolateScope();
1818
console.assert(scope, 'cannot find scope from ' + name);
1919

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /