Tingkatkan ke Angular 5 terbaru
Paket Dep Sudut:
npm install @angular/{animations,common,compiler,core,forms,http,platform-browser,platform-browser-dynamic,router}@latest --save
Paket lain yang diinstal oleh cli sudut
npm install --save core-js@latest rxjs@latest zone.js@latest
Paket Dev Angular:
npm install --save-dev @angular/{compiler-cli,cli,language-service}@latest
Paket Tipe Dev:
npm install --save-dev @types/{jasmine,jasminewd2,node}@latest
Paket-paket lain yang diinstal sebagai dev dev oleh sudut sudut:
npm install --save-dev codelyzer@latest jasmine-core@latest jasmine-spec-reporter@latest karma@latest karma-chrome-launcher@latest karma-cli@latest karma-coverage-istanbul-reporter@latest karma-jasmine@latest karma-jasmine-html-reporter@latest protractor@latest ts-node@latest tslint@latest
Instal versi terbaru yang didukung yang digunakan oleh Angular cli (jangan lakukan @latest):
npm install --save-dev typescript@2.4.2
Ganti nama file angular-cli.json menjadi .angular-cli.json dan perbarui konten:
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"project": {
"name": "project3-example"
},
"apps": [
{
"root": "src",
"outDir": "dist",
"assets": [
"assets",
"favicon.ico"
],
"index": "index.html",
"main": "main.ts",
"polyfills": "polyfills.ts",
"test": "test.ts",
"tsconfig": "tsconfig.app.json",
"testTsconfig": "tsconfig.spec.json",
"prefix": "app",
"styles": [
"styles.css"
],
"scripts": [],
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
}
}
],
"e2e": {
"protractor": {
"config": "./protractor.conf.js"
}
},
"lint": [
{
"project": "src/tsconfig.app.json",
"exclude": "**/node_modules/**"
},
{
"project": "src/tsconfig.spec.json",
"exclude": "**/node_modules/**"
},
{
"project": "e2e/tsconfig.e2e.json",
"exclude": "**/node_modules/**"
}
],
"test": {
"karma": {
"config": "./karma.conf.js"
}
},
"defaults": {
"styleExt": "css",
"component": {}
}
}
npm install angular2@2.0.0beta.14 --save
harus melakukannya, saya pikir.