add typing to UpgradeModule DI

This commit is contained in:
Filipe Silva 2016-11-12 11:00:00 +00:00
parent e710481076
commit b342d24ef3
9 changed files with 9 additions and 9 deletions

View File

@ -22,7 +22,7 @@ angular.module('heroApp', [])
// #docregion bootstrap // #docregion bootstrap
platformBrowserDynamic().bootstrapModule(AppModule).then(platformRef => { platformBrowserDynamic().bootstrapModule(AppModule).then(platformRef => {
let upgrade = platformRef.injector.get(UpgradeModule); let upgrade = platformRef.injector.get(UpgradeModule) as UpgradeModule;
upgrade.bootstrap(document.body, ['heroApp'], {strictDi: true}); upgrade.bootstrap(document.body, ['heroApp'], {strictDi: true});
}); });
// #enddocregion bootstrap // #enddocregion bootstrap

View File

@ -31,6 +31,6 @@ angular.module('heroApp', [])
})); }));
platformBrowserDynamic().bootstrapModule(AppModule).then(platformRef => { platformBrowserDynamic().bootstrapModule(AppModule).then(platformRef => {
let upgrade = platformRef.injector.get(UpgradeModule); let upgrade = platformRef.injector.get(UpgradeModule) as UpgradeModule;
upgrade.bootstrap(document.body, ['heroApp'], {strictDi: true}); upgrade.bootstrap(document.body, ['heroApp'], {strictDi: true});
}); });

View File

@ -36,6 +36,6 @@ angular.module('heroApp', [])
// #enddocregion register // #enddocregion register
platformBrowserDynamic().bootstrapModule(AppModule).then(platformRef => { platformBrowserDynamic().bootstrapModule(AppModule).then(platformRef => {
let upgrade = platformRef.injector.get(UpgradeModule); let upgrade = platformRef.injector.get(UpgradeModule) as UpgradeModule;
upgrade.bootstrap(document.body, ['heroApp'], {strictDi: true}); upgrade.bootstrap(document.body, ['heroApp'], {strictDi: true});
}); });

View File

@ -25,6 +25,6 @@ angular.module('heroApp', [])
// #enddocregion register // #enddocregion register
platformBrowserDynamic().bootstrapModule(AppModule).then(platformRef => { platformBrowserDynamic().bootstrapModule(AppModule).then(platformRef => {
let upgrade = platformRef.injector.get(UpgradeModule); let upgrade = platformRef.injector.get(UpgradeModule) as UpgradeModule;
upgrade.bootstrap(document.body, ['heroApp'], {strictDi: true}); upgrade.bootstrap(document.body, ['heroApp'], {strictDi: true});
}); });

View File

@ -31,6 +31,6 @@ angular.module('heroApp', [])
.directive('myContainer', downgradeComponent({component: ContainerComponent})); .directive('myContainer', downgradeComponent({component: ContainerComponent}));
platformBrowserDynamic().bootstrapModule(AppModule).then(platformRef => { platformBrowserDynamic().bootstrapModule(AppModule).then(platformRef => {
let upgrade = platformRef.injector.get(UpgradeModule); let upgrade = platformRef.injector.get(UpgradeModule) as UpgradeModule;
upgrade.bootstrap(document.body, ['heroApp'], {strictDi: true}); upgrade.bootstrap(document.body, ['heroApp'], {strictDi: true});
}); });

View File

@ -38,6 +38,6 @@ angular.module('heroApp', [])
// #enddocregion downgradecomponent // #enddocregion downgradecomponent
platformBrowserDynamic().bootstrapModule(AppModule).then(platformRef => { platformBrowserDynamic().bootstrapModule(AppModule).then(platformRef => {
let upgrade = platformRef.injector.get(UpgradeModule); let upgrade = platformRef.injector.get(UpgradeModule) as UpgradeModule;
upgrade.bootstrap(document.body, ['heroApp'], {strictDi: true}); upgrade.bootstrap(document.body, ['heroApp'], {strictDi: true});
}); });

View File

@ -32,6 +32,6 @@ angular.module('heroApp', [])
// #enddocregion downgradecomponent // #enddocregion downgradecomponent
platformBrowserDynamic().bootstrapModule(AppModule).then(platformRef => { platformBrowserDynamic().bootstrapModule(AppModule).then(platformRef => {
let upgrade = platformRef.injector.get(UpgradeModule); let upgrade = platformRef.injector.get(UpgradeModule) as UpgradeModule;
upgrade.bootstrap(document.body, ['heroApp'], {strictDi: true}); upgrade.bootstrap(document.body, ['heroApp'], {strictDi: true});
}); });

View File

@ -31,6 +31,6 @@ angular.module('heroApp', [])
.directive('myContainer', downgradeComponent({component: ContainerComponent})); .directive('myContainer', downgradeComponent({component: ContainerComponent}));
platformBrowserDynamic().bootstrapModule(AppModule).then(platformRef => { platformBrowserDynamic().bootstrapModule(AppModule).then(platformRef => {
let upgrade = platformRef.injector.get(UpgradeModule); let upgrade = platformRef.injector.get(UpgradeModule) as UpgradeModule;
upgrade.bootstrap(document.body, ['heroApp'], {strictDi: true}); upgrade.bootstrap(document.body, ['heroApp'], {strictDi: true});
}); });

View File

@ -31,6 +31,6 @@ angular.module('heroApp', [])
.directive('myContainer', downgradeComponent({component: ContainerComponent})); .directive('myContainer', downgradeComponent({component: ContainerComponent}));
platformBrowserDynamic().bootstrapModule(AppModule).then(platformRef => { platformBrowserDynamic().bootstrapModule(AppModule).then(platformRef => {
let upgrade = platformRef.injector.get(UpgradeModule); let upgrade = platformRef.injector.get(UpgradeModule) as UpgradeModule;
upgrade.bootstrap(document.body, ['heroApp'], {strictDi: true}); upgrade.bootstrap(document.body, ['heroApp'], {strictDi: true});
}); });