Skip to content

Commit d60fd44

Browse files
committed
fix(demo): upgraded the demo app to angular v8
1 parent 6f47fdf commit d60fd44

File tree

9 files changed

+2897
-2010
lines changed

9 files changed

+2897
-2010
lines changed
File renamed without changes.

demo/package.json

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,41 +16,40 @@
1616
"private": true,
1717
"dependencies": {
1818
"@angular-material-extensions/faq": "^3.0.4",
19-
"@angular/animations": "^7.2.11",
19+
"@angular/animations": "^8.1.3",
2020
"@angular/cdk": "^6.4.7",
21-
"@angular/common": "^7.2.11",
22-
"@angular/compiler": "^7.2.11",
23-
"@angular/core": "^7.2.11",
21+
"@angular/common": "^8.1.3",
22+
"@angular/compiler": "^8.1.3",
23+
"@angular/core": "^8.1.3",
2424
"@angular/flex-layout": "^6.0.0-beta.18",
25-
"@angular/forms": "^7.2.11",
26-
"@angular/http": "^7.2.11",
25+
"@angular/forms": "^8.1.3",
2726
"@angular/material": "^6.4.7",
28-
"@angular/platform-browser": "^7.2.11",
29-
"@angular/platform-browser-dynamic": "^7.2.11",
30-
"@angular/platform-server": "^7.2.11",
31-
"@angular/router": "^7.2.11",
27+
"@angular/platform-browser": "^8.1.3",
28+
"@angular/platform-browser-dynamic": "^8.1.3",
29+
"@angular/platform-server": "^8.1.3",
30+
"@angular/router": "^8.1.3",
3231
"@ng-bootstrap/ng-bootstrap": "^2.2.2",
3332
"bootstrap": "^4.3.1",
3433
"core-js": "^2.6.5",
3534
"font-awesome": "^4.7.0",
3635
"include-media": "^1.4.9",
3736
"material-design-icons": "^3.0.1",
3837
"ngx-highlightjs": "^2.1.4",
39-
"rxjs": "^6.4.0",
40-
"zone.js": "^0.8.29"
38+
"rxjs": "^6.5.2",
39+
"zone.js": "~0.9.1"
4140
},
4241
"devDependencies": {
43-
"@angular-devkit/build-angular": "~0.6.8",
44-
"@angular/cli": "^7.3.7",
45-
"@angular/compiler-cli": "^7.2.11",
46-
"@angular/language-service": "^7.2.11",
42+
"@angular-devkit/build-angular": "~0.801.3",
43+
"@angular/cli": "^8.1.3",
44+
"@angular/compiler-cli": "^8.1.3",
45+
"@angular/language-service": "^8.1.3",
4746
"@angularclass/hmr": "~2.1.3",
4847
"@nguniversal/common": "^6.1.0",
4948
"@nguniversal/express-engine": "^6.1.0",
5049
"@nguniversal/module-map-ngfactory-loader": "^6.1.0",
5150
"@types/jest": "^23.3.14",
5251
"@types/node": "^10.14.4",
53-
"codelyzer": "^4.5.0",
52+
"codelyzer": "^5.0.1",
5453
"express": "^4.16.4",
5554
"jest": "^23.6.0",
5655
"jest-preset-angular": "^5.2.3",
@@ -59,7 +58,7 @@
5958
"ts-loader": "^4.5.0",
6059
"ts-node": "^6.2.0",
6160
"tslint": "~5.10.0",
62-
"typescript": "~3.2.4",
61+
"typescript": "~3.4.5",
6362
"webpack-cli": "^3.3.0"
6463
},
6564
"jest": {

demo/src/app/app-routing.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const routes: Routes = [
99
},
1010
{
1111
path: 'getting-started',
12-
loadChildren: 'app/getting-started/getting-started.module#GettingStartedModule'
12+
loadChildren: () => import('app/getting-started/getting-started.module').then(m => m.GettingStartedModule)
1313
}
1414
];
1515

demo/src/polyfills.ts

Lines changed: 21 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -11,70 +11,53 @@
1111
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
1212
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
1313
*
14-
* Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
14+
* Learn more in https://angular.io/guide/browser-support
1515
*/
1616

1717
/***************************************************************************************************
1818
* BROWSER POLYFILLS
1919
*/
2020

21-
/** IE9, IE10 and IE11 requires all of the following polyfills. **/
22-
// import 'core-js/es6/symbol';
23-
// import 'core-js/es6/object';
24-
// import 'core-js/es6/function';
25-
// import 'core-js/es6/parse-int';
26-
// import 'core-js/es6/parse-float';
27-
// import 'core-js/es6/number';
28-
// import 'core-js/es6/math';
29-
// import 'core-js/es6/string';
30-
// import 'core-js/es6/date';
31-
// import 'core-js/es6/array';
32-
// import 'core-js/es6/regexp';
33-
// import 'core-js/es6/map';
34-
// import 'core-js/es6/weak-map';
35-
// import 'core-js/es6/set';
36-
3721
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
3822
// import 'classlist.js'; // Run `npm install --save classlist.js`.
3923

40-
/** IE10 and IE11 requires the following for the Reflect API. */
41-
// import 'core-js/es6/reflect';
42-
43-
44-
/** Evergreen browsers require these. **/
45-
// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
46-
import 'core-js/es7/reflect';
47-
48-
4924
/**
5025
* Web Animations `@angular/platform-browser/animations`
5126
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
5227
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
53-
**/
28+
*/
5429
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
5530

5631
/**
5732
* By default, zone.js will patch all possible macroTask and DomEvents
5833
* user can disable parts of macroTask/DomEvents patch by setting following flags
34+
* because those flags need to be set before `zone.js` being loaded, and webpack
35+
* will put import in the top of bundle, so user need to create a separate file
36+
* in this directory (for example: zone-flags.ts), and put the following flags
37+
* into that file, and then add the following code before importing zone.js.
38+
* import './zone-flags.ts';
39+
*
40+
* The flags allowed in zone-flags.ts are listed here.
41+
*
42+
* The following flags will work for all browsers.
43+
*
44+
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
45+
* (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
46+
* (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
47+
*
48+
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
49+
* with the following flag, it will bypass `zone.js` patch for IE/Edge
50+
*
51+
* (window as any).__Zone_enable_cross_context_check = true;
52+
*
5953
*/
6054

61-
// (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
62-
// (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
63-
// (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
64-
65-
/*
66-
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
67-
* with the following flag, it will bypass `zone.js` patch for IE/Edge
68-
*/
69-
// (window as any).__Zone_enable_cross_context_check = true;
70-
7155
/***************************************************************************************************
7256
* Zone JS is required by default for Angular itself.
7357
*/
7458
import 'zone.js/dist/zone'; // Included with Angular CLI.
7559

7660

77-
7861
/***************************************************************************************************
7962
* APPLICATION IMPORTS
8063
*/

demo/src/tsconfig.app.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"compilerOptions": {
44
"outDir": "../out-tsc/app",
55
"baseUrl": "./",
6-
"module": "es2015",
76
"types": [],
87
"paths": {
98
"@angular/*": ["../node_modules/@angular/*"]

demo/src/tsconfig.spec.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
"compilerOptions": {
44
"outDir": "../out-tsc/spec",
55
"baseUrl": "./",
6-
"module": "commonjs",
7-
"target": "es5",
86
"types": [
97
"jasmine",
108
"node"

demo/tsconfig.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
{
22
"compileOnSave": false,
33
"compilerOptions": {
4+
"downlevelIteration": true,
5+
"module": "esnext",
46
"outDir": "./dist/out-tsc",
57
"sourceMap": true,
68
"declaration": false,
79
"moduleResolution": "node",
810
"emitDecoratorMetadata": true,
911
"experimentalDecorators": true,
10-
"target": "es5",
12+
"target": "es2015",
1113
"typeRoots": [
1214
"node_modules/@types"
1315
],

demo/tslint.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,12 @@
117117
"check-type"
118118
],
119119
"no-output-on-prefix": true,
120-
"use-input-property-decorator": true,
121-
"use-output-property-decorator": true,
122-
"use-host-property-decorator": true,
120+
"no-inputs-metadata-property": true,
121+
"no-outputs-metadata-property": true,
122+
"no-host-metadata-property": true,
123123
"no-input-rename": true,
124124
"no-output-rename": true,
125-
"use-life-cycle-interface": true,
125+
"use-lifecycle-interface": true,
126126
"use-pipe-transform-interface": true,
127127
"component-class-suffix": true,
128128
"directive-class-suffix": true

0 commit comments

Comments
 (0)