Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Commit 1898fed

Browse files
committed
style(NgView): Minor style changes from reverted commit "Make use of the ViewPort"
This reverts commit ed40de4. Conflicts: lib/routing/ng_view.dart test/routing/routing_spec.dart
1 parent 062edeb commit 1898fed

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

lib/routing/ng_view.dart

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ part of angular.routing;
6262
class NgView implements DetachAware, RouteProvider {
6363
static final Module _module = new Module()
6464
..bind(RouteProvider, toFactory: (i) => i.get(NgView));
65-
6665
static module() => _module;
6766

6867
final NgRoutingHelper locationService;
@@ -113,10 +112,9 @@ class NgView implements DetachAware, RouteProvider {
113112
_cleanUp();
114113
});
115114

116-
var viewInjector = injector;
117-
if (modules != null) {
118-
viewInjector = forceNewDirectivesAndFormatters(viewInjector, modules);
119-
}
115+
var viewInjector = modules == null ?
116+
injector :
117+
forceNewDirectivesAndFormatters(injector, modules);
120118

121119
var newDirectives = viewInjector.get(DirectiveMap);
122120
var viewFuture = viewDef.templateHtml != null ?
@@ -127,7 +125,6 @@ class NgView implements DetachAware, RouteProvider {
127125
_scope = scope.createChild(new PrototypeMap(scope.context));
128126
_view = viewFactory(
129127
viewInjector.createChild([new Module()..bind(Scope, toValue: _scope)]));
130-
131128
_view.nodes.forEach((elm) => element.append(elm));
132129
});
133130
}

0 commit comments

Comments
 (0)