Upgrade auf das neueste Angular 5
Angular Dep-Pakete:
npm install @angular/{animations,common,compiler,core,forms,http,platform-browser,platform-browser-dynamic,router}@latest --save
Andere Pakete, die von der eckigen CLI installiert werden
npm install --save core-js@latest rxjs@latest zone.js@latest
Angular Dev-Pakete:
npm install --save-dev @angular/{compiler-cli,cli,language-service}@latest
Typen Dev-Pakete:
npm install --save-dev @types/{jasmine,jasminewd2,node}@latest
Andere Pakete, die vom Winkelcli als dev dev installiert werden:
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
Installieren Sie die neueste unterstützte Version, die von Angular CLI verwendet wird (tun Sie nicht @latest):
npm install --save-dev typescript@2.4.2
Benennen Sie die Datei angle-cli.json in .angular-cli.json um und aktualisieren Sie den Inhalt:
{
"$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
sollte es tun, denke ich.