@@ -83,7 +83,7 @@ class ElementBinder {
83
83
bool get hasDirectivesOrEvents =>
84
84
_usableDirectiveRefs.isNotEmpty || onEvents.isNotEmpty;
85
85
86
- _bindTwoWay (tasks, expression, scope, dstPathFn, controller, formatters, dstExpression) {
86
+ void _bindTwoWay (tasks, expression, scope, dstPathFn, controller, formatters, dstExpression) {
87
87
var taskId = tasks.registerTask ();
88
88
Expression expressionFn = _parser (expression);
89
89
@@ -120,11 +120,13 @@ class ElementBinder {
120
120
}, formatters: formatters);
121
121
}
122
122
123
- _bindCallback (dstPathFn, controller, expression, scope) {
123
+ void _bindCallback (dstPathFn, controller, expression, scope) {
124
124
dstPathFn.assign (controller, _parser (expression).bind (scope.context, ScopeLocals .wrapper));
125
125
}
126
126
127
- _createAttrMappings (directive, scope, List <MappingParts > mappings, nodeAttrs, formatters, tasks) {
127
+
128
+ void _createAttrMappings (directive, scope, List <MappingParts > mappings, nodeAttrs, formatters,
129
+ tasks) {
128
130
mappings.forEach ((MappingParts p) {
129
131
var attrName = p.attrName;
130
132
var dstExpression = p.dstExpression;
@@ -199,7 +201,7 @@ class ElementBinder {
199
201
});
200
202
}
201
203
202
- _link (nodeInjector, probe, scope, nodeAttrs, formatters) {
204
+ void _link (nodeInjector, probe, scope, nodeAttrs, formatters) {
203
205
_usableDirectiveRefs.forEach ((DirectiveRef ref) {
204
206
var linkTimer;
205
207
try {
@@ -245,8 +247,8 @@ class ElementBinder {
245
247
});
246
248
}
247
249
248
- _createDirectiveFactories (DirectiveRef ref, nodeModule, node, nodesAttrsDirectives, nodeAttrs,
249
- visibility) {
250
+ void _createDirectiveFactories (DirectiveRef ref, nodeModule, node, nodesAttrsDirectives, nodeAttrs,
251
+ visibility) {
250
252
if (ref.type == TextMustache ) {
251
253
nodeModule.bind (TextMustache , toFactory: (Injector injector) {
252
254
return new TextMustache (node, ref.value, injector.get (Interpolate ),
@@ -281,7 +283,7 @@ class ElementBinder {
281
283
}
282
284
283
285
// Overridden in TemplateElementBinder
284
- _registerViewFactory (node, parentInjector, nodeModule) {
286
+ void _registerViewFactory (node, parentInjector, nodeModule) {
285
287
nodeModule..bind (ViewPort , toValue: null )
286
288
..bind (ViewFactory , toValue: null )
287
289
..bind (BoundViewFactory , toValue: null );
@@ -348,7 +350,7 @@ class ElementBinder {
348
350
* Private class used for managing controller.attach() calls
349
351
*/
350
352
class _TaskList {
351
- var onDone;
353
+ Function onDone;
352
354
final List _tasks = [];
353
355
bool isDone = false ;
354
356
@@ -371,7 +373,7 @@ class _TaskList {
371
373
}
372
374
}
373
375
374
- doneRegistering () {
376
+ void doneRegistering () {
375
377
completeTask (registerTask ());
376
378
}
377
379
}
@@ -396,7 +398,7 @@ class TaggedTextBinder {
396
398
final int offsetIndex;
397
399
398
400
TaggedTextBinder (this .binder, this .offsetIndex);
399
- toString () => "[TaggedTextBinder binder:$binder offset:$offsetIndex ]" ;
401
+ String toString () => "[TaggedTextBinder binder:$binder offset:$offsetIndex ]" ;
400
402
}
401
403
402
404
// Used for the tagging compiler
@@ -414,6 +416,8 @@ class TaggedElementBinder {
414
416
textBinders.add (tagged);
415
417
}
416
418
419
+ bool get isDummy => binder == null && textBinders == null && ! isTopLevel;
420
+
417
421
String toString () => "[TaggedElementBinder binder:$binder parentBinderOffset:"
418
422
"$parentBinderOffset textBinders:$textBinders ]" ;
419
423
}
0 commit comments