Closed eredo closed 7 years ago
@eredo Unfortunately you'll need to also invoke initReflector
:
Future<dynamic> loader() => def.loadLibrary().then((_) {
def.initReflector();
return def.DeferredRouteComponent;
});
Thanks, is this documented anywhere?
I thought it was in https://github.com/dart-lang/angular/blob/master/doc/component_loading.md, but I see that it is not. I'll make a small update to the docs.
In angular 4.0.0-beta deferred routes are no longer working. Whenever an AsyncRoute is called the following exception is thrown:
Here an example implementation:
pubspec.yaml
main.dart
app_component.dart
deferred_route_component.dart
I'm not sure if this appeared in previous alpha versions as well, because we tried to migrate from 3.1.0 to 4.0.0-beta.