Skip to content

Commit 1d0739a

Browse files
committed
refactor(probe): Remove use of NodeAttrs
1 parent 71d2d07 commit 1d0739a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/mock/probe.dart

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@ class Probe implements NgDetachAware {
1414
final Scope scope;
1515
final Injector injector;
1616
final Element element;
17-
final NodeAttrs _attrs;
17+
String _probeName;
1818

19-
Probe(this.scope, this.injector, this.element, this._attrs) {
20-
scope.rootScope.context[_attrs['probe']] = this;
19+
Probe(this.scope, this.injector, this.element) {
20+
_probeName = element.attributes['probe'];
21+
scope.rootScope.context[_probeName] = this;
2122
}
2223

2324
void detach() {
24-
scope.rootScope.context[_attrs['probe']] = null;
25+
scope.rootScope.context[_probeName] = null;
2526
}
2627

2728
/**

0 commit comments

Comments
 (0)