| Index: third_party/pkg/angular/test/routing/ng_view_spec.dart
|
| ===================================================================
|
| --- third_party/pkg/angular/test/routing/ng_view_spec.dart (revision 33054)
|
| +++ third_party/pkg/angular/test/routing/ng_view_spec.dart (working copy)
|
| @@ -13,7 +13,7 @@
|
| beforeEach(module((Module m) {
|
| m
|
| ..install(new AngularMockModule())
|
| - ..type(RouteInitializerFn, implementedBy: FlatRouteInitializer);
|
| + ..type(RouteInitializer, implementedBy: FlatRouteInitializer);
|
| }));
|
|
|
| beforeEach(inject((TestBed tb, Router _router, TemplateCache templates) {
|
| @@ -54,7 +54,7 @@
|
| Element root = _.compile('<ng-view></ng-view>');
|
| expect(root.text).toEqual('');
|
|
|
| - _.rootScope.apply();
|
| + _.rootScope.$digest();
|
| microLeap();
|
| expect(root.text).toEqual('Foo');
|
| }));
|
| @@ -83,7 +83,7 @@
|
| beforeEach(module((Module m) {
|
| m
|
| ..install(new AngularMockModule())
|
| - ..type(RouteInitializerFn, implementedBy: NestedRouteInitializer);
|
| + ..type(RouteInitializer, implementedBy: NestedRouteInitializer);
|
| }));
|
|
|
| beforeEach(inject((TestBed tb, Router _router, TemplateCache templates) {
|
| @@ -128,8 +128,8 @@
|
| });
|
| }
|
|
|
| -class FlatRouteInitializer implements Function {
|
| - void call(Router router, ViewFactory view) {
|
| +class FlatRouteInitializer implements RouteInitializer {
|
| + void init(Router router, ViewFactory view) {
|
| router.root
|
| ..addRoute(
|
| name: 'foo',
|
| @@ -145,8 +145,8 @@
|
| }
|
| }
|
|
|
| -class NestedRouteInitializer implements Function {
|
| - void call(Router router, ViewFactory view) {
|
| +class NestedRouteInitializer implements RouteInitializer {
|
| + void init(Router router, ViewFactory view) {
|
| router.root
|
| ..addRoute(
|
| name: 'library',
|
| @@ -170,9 +170,9 @@
|
| name: 'read',
|
| path: '/read',
|
| enter: view('book_read.html'))))
|
| - ..addRoute(
|
| - name: 'admin',
|
| - path: '/admin',
|
| - enter: view('admin.html'));
|
| + ..addRoute(
|
| + name: 'admin',
|
| + path: '/admin',
|
| + enter: view('admin.html'));
|
| }
|
| }
|
|
|