這樣看來,推測可能是其它 module 的問題
列出目前使用的 npm 套件
package.json
"dependencies": {
"@angular/animations": "^4.1.0",
"@angular/common": "^4.1.0",
"@angular/compiler": "^4.1.0",
"@angular/core": "^4.1.0",
"@angular/forms": "^4.1.0",
"@angular/http": "^4.1.0",
"@angular/platform-browser": "^4.1.0",
"@angular/platform-browser-dynamic": "^4.1.0",
"@angular/router": "^4.1.0",
"angular2-busy": "^2.0.4",
"angular2-jwt": "^0.2.2",
"bootstrap": "^4.0.0-alpha.6",
"core-js": "^2.4.1",
"d3": "^4.7.4",
"devextreme": "^16.2.6",
"devextreme-angular": "^16.2.6",
"highcharts": "^5.0.10",
"jquery": "^3.2.1",
"ng-sidebar": "^4.2.1",
"ngx-bootstrap": "^1.6.6",
"rxjs": "^5.3.1",
"topojson": "^3.0.0",
"zone.js": "^0.8.10"
},
"devDependencies": {
"@angular/cli": "^1.0.2",
"@angular/compiler-cli": "^4.0.0",
"@types/d3": "^4.7.0",
"@types/highcharts": "^4.2.54",
"@types/jasmine": "2.5.38",
"@types/jquery": "^2.0.41",
"@types/node": "~6.0.60",
"codelyzer": "~2.0.0",
"jasmine-core": "~2.5.2",
"jasmine-spec-reporter": "~3.2.0",
"karma": "~1.4.1",
"karma-chrome-launcher": "~2.0.0",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^0.2.0",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.0",
"ts-node": "~2.0.0",
"tslint": "~4.5.0",
"typescript": "~2.2.0"
}
另外再貼上 .angular-cli.json include 的 styles 及 scripts
"styles": [
"../node_modules/bootstrap/dist/css/bootstrap.min.css",
"../node_modules/angular2-busy/build/style/busy.css",
"../node_modules/devextreme/dist/css/dx.common.css",
"../node_modules/devextreme/dist/css/dx.light.css",
"styles.css"
],
"scripts": [
"../node_modules/jquery/dist/jquery.min.js",
"../node_modules/d3/build/d3.min.js",
"../node_modules/topojson/dist/topojson.min.js",
"../node_modules/tether/dist/js/tether.min.js",
"../node_modules/bootstrap/dist/js/bootstrap.min.js"
],
再重新 create 一個新的 ng-project ,一一加入這些 module ,
測試看看 aot 的影響,有進度會再來回報。感謝