Skip to content

Commit 1c7426f

Browse files
authored
feat(examples): upgrade to v9 and enable ivy (#1227)
1 parent 89e3a89 commit 1c7426f

8 files changed

Lines changed: 603 additions & 503 deletions

File tree

examples/angular/.bazelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
import %workspace%/../../common.bazelrc
2+
# Use the Angular IVy compiler
3+
# See https://github.com/angular/angular/blob/master/docs/BAZEL.md#various-flags-used-for-tests
4+
build --define=compile=aot

examples/angular/angular-metadata.tsconfig.json

Lines changed: 0 additions & 39 deletions
This file was deleted.

examples/angular/package.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
"yarn": ">=1.9.2 <2.0.0"
99
},
1010
"dependencies": {
11-
"@angular/animations": "8.2.8",
11+
"@angular/animations": "9.0.0-next.8",
1212
"@angular/cdk": "8.2.2",
13-
"@angular/common": "8.2.8",
14-
"@angular/core": "8.2.8",
15-
"@angular/forms": "8.2.8",
13+
"@angular/common": "9.0.0-next.8",
14+
"@angular/core": "9.0.0-next.8",
15+
"@angular/forms": "9.0.0-next.8",
1616
"@angular/material": "8.2.2",
17-
"@angular/platform-browser": "8.2.8",
18-
"@angular/platform-browser-dynamic": "8.2.8",
19-
"@angular/router": "8.2.8",
17+
"@angular/platform-browser": "9.0.0-next.8",
18+
"@angular/platform-browser-dynamic": "9.0.0-next.8",
19+
"@angular/router": "9.0.0-next.8",
2020
"@ngrx/store": "8.3.0",
2121
"date-fns": "1.30.1",
2222
"rxjs": "6.5.3",
@@ -25,17 +25,17 @@
2525
"zone.js": "0.10.2"
2626
},
2727
"devDependencies": {
28-
"@angular/bazel": "8.2.8",
29-
"@angular/cli": "8.3.6",
30-
"@angular/compiler": "8.2.8",
31-
"@angular/compiler-cli": "8.2.8",
28+
"@angular/bazel": "9.0.0-next.8",
29+
"@angular/cli": "9.0.0-next.6",
30+
"@angular/compiler": "9.0.0-next.8",
31+
"@angular/compiler-cli": "9.0.0-next.8",
3232
"@bazel/bazel": "^0.29.0",
3333
"@bazel/benchmark-runner": "0.1.0",
3434
"@bazel/buildifier": "0.28.0",
3535
"@bazel/ibazel": "0.10.3",
36-
"@bazel/karma": "latest",
37-
"@bazel/protractor": "latest",
38-
"@bazel/typescript": "latest",
36+
"@bazel/karma": "^0.38.0",
37+
"@bazel/protractor": "^0.38.0",
38+
"@bazel/typescript": "^0.38.0",
3939
"@types/jasmine": "3.4.0",
4040
"@types/node": "6.14.6",
4141
"core-js": "2.6.9",
@@ -52,7 +52,7 @@
5252
"e2e": "bazel test //e2e:all",
5353
"test": "bazel test //src/...",
5454
"benchmark": "ibazel-benchmark-runner //src:devserver src/app/hello-world/hello-world.component.ts --url=http://localhost:5432",
55-
"postinstall": "patch-package && ngc -p angular-metadata.tsconfig.json",
55+
"postinstall": "patch-package && ivy-ngcc",
5656
"generate": "node tools/generator/index.js",
5757
"generate:clean": "node tools/generator/index.js --clean"
5858
}

examples/angular/patches/@angular+bazel+8.2.8.patch renamed to examples/angular/patches/@angular+bazel+9.0.0-next.8.patch

File renamed without changes.

examples/angular/src/app/app-routing.module.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@ const routes: Routes = [
1010
{
1111
path: '',
1212
pathMatch: 'full',
13-
loadChildren: () => import('./home/home.ngfactory').then(m => m.HomeModuleNgFactory)
13+
loadChildren: () => import('./home/home').then(m => m.HomeModule)
1414
},
1515
{
1616
path: 'hello',
1717
pathMatch: 'full',
1818
loadChildren: () =>
19-
import('./hello-world/hello-world.module.ngfactory').then(m => m.HelloWorldModuleNgFactory)
19+
import('./hello-world/hello-world.module').then(m => m.HelloWorldModule)
2020
},
2121
{
2222
path: 'todos',
2323
pathMatch: 'full',
24-
loadChildren: () => import('./todos/todos.module.ngfactory').then(m => m.TodosModuleNgFactory)
24+
loadChildren: () => import('./todos/todos.module').then(m => m.TodosModule)
2525
}
2626
];
2727

examples/angular/src/main.dev.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
* Used to launch the application under Bazel development mode.
33
*/
44
import {platformBrowser} from '@angular/platform-browser';
5-
import {AppModuleNgFactory} from './app/app.module.ngfactory';
5+
import {AppModule} from './app/app.module';
66

7-
platformBrowser().bootstrapModuleFactory(AppModuleNgFactory);
7+
platformBrowser().bootstrapModule(AppModule);

examples/angular/src/main.prod.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*/
44
import {enableProdMode} from '@angular/core';
55
import {platformBrowser} from '@angular/platform-browser';
6-
import {AppModuleNgFactory} from './app/app.module.ngfactory';
6+
import {AppModule} from './app/app.module';
77

88
enableProdMode();
9-
platformBrowser().bootstrapModuleFactory(AppModuleNgFactory);
9+
platformBrowser().bootstrapModule(AppModule);

0 commit comments

Comments
 (0)