Skip to content

Commit 8ebc21c

Browse files
upgrading the component but some console errors
1 parent 6cfa2d8 commit 8ebc21c

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

src/app/app.module.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ export class RootComponent {
4747
bootstrap: [ RootComponent ]
4848
})
4949
export class AppModule {
50-
constructor(private upgrade: UpgradeModule) {
50+
constructor( upgrade: UpgradeModule) {
51+
upgrade.bootstrap(document.body, ['demo'], { strictDi: true });
5152
}
5253

5354
ngDoBootstrap() {

src/main.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,16 @@ if (environment.production) {
99
enableProdMode();
1010
}
1111

12-
// platformBrowserDynamic().bootstrapModule(AppModule);
1312

14-
platformBrowserDynamic().bootstrapModule(AppModule)
15-
.then(ref => {
16-
// Once Angular bootstrap is complete then we bootstrap the AngularJS module
17-
const upgrade = ref.injector.get(UpgradeModule) as UpgradeModule;
13+
// platformBrowserDynamic().bootstrapModule(AppModule)
14+
// .then(ref => {
15+
// // Once Angular bootstrap is complete then we bootstrap the AngularJS module
16+
// const upgrade = ref.injector.get(UpgradeModule) as UpgradeModule;
1817

19-
upgrade.bootstrap(document.body, ['demo']);
20-
});
21-
// platformBrowserDynamic().bootstrapModule(AppModule);
18+
// upgrade.bootstrap(document.body, ['demo']);
19+
// });
20+
21+
22+
platformBrowserDynamic().bootstrapModule(AppModule);
2223

2324

0 commit comments

Comments
 (0)