docs(aio): upgrade to v5 and cli 1.5

PR Close #20077
This commit is contained in:
Jesus Rodriguez 2017-11-01 21:18:03 +01:00 committed by Matias Niemelä
parent 171ae154c2
commit ca129ba549
11 changed files with 516 additions and 184 deletions

View File

@ -20,12 +20,12 @@ export class HeroService {
getHero(id: number) { getHero(id: number) {
return this.http.get(`api/heroes/${id}`) return this.http.get(`api/heroes/${id}`)
.map(response => response.json().data as Hero); .map(response => response.json() as Hero);
} }
getHeroes() { getHeroes() {
return this.http.get(`api/heroes`) return this.http.get(`api/heroes`)
.map(response => response.json().data as Hero[]); .map(response => response.json() as Hero[]);
} }
} }

View File

@ -11,7 +11,7 @@ export class HeroService {
getHeroes() { getHeroes() {
return this.http.get('api/heroes') return this.http.get('api/heroes')
.map((response: Response) => <Hero[]>response.json().data); .map((response: Response) => <Hero[]>response.json());
} }
} }
// #enddocregion example // #enddocregion example

View File

@ -12,28 +12,27 @@
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@angular/animations": "^4.2.4", "@angular/animations": "^5.0.0",
"@angular/common": "^4.2.4", "@angular/common": "^5.0.0",
"@angular/compiler": "^4.2.4", "@angular/compiler": "^5.0.0",
"@angular/core": "^4.2.4", "@angular/core": "^5.0.0",
"@angular/forms": "^4.2.4", "@angular/forms": "^5.0.0",
"@angular/http": "^4.2.4", "@angular/http": "^5.0.0",
"@angular/platform-browser": "^4.2.4", "@angular/platform-browser": "^5.0.0",
"@angular/platform-browser-dynamic": "^4.2.4", "@angular/platform-browser-dynamic": "^5.0.0",
"@angular/router": "^4.2.4", "@angular/router": "^5.0.0",
"core-js": "^2.4.1", "core-js": "^2.4.1",
"rxjs": "^5.4.2", "rxjs": "^5.5.2",
"web-animations-js": "^2.3.1",
"zone.js": "^0.8.14" "zone.js": "^0.8.14"
}, },
"devDependencies": { "devDependencies": {
"@angular/cli": "1.3.1", "@angular/cli": "1.5.0",
"@angular/compiler-cli": "^4.2.4", "@angular/compiler-cli": "^5.0.0",
"@angular/language-service": "^4.2.4", "@angular/language-service": "^5.0.0",
"@types/jasmine": "~2.5.53", "@types/jasmine": "~2.5.53",
"@types/jasminewd2": "~2.0.2", "@types/jasminewd2": "~2.0.2",
"@types/node": "~6.0.60", "@types/node": "~6.0.60",
"codelyzer": "~3.1.1", "codelyzer": "~3.2.0",
"jasmine-core": "~2.6.2", "jasmine-core": "~2.6.2",
"jasmine-spec-reporter": "~4.1.0", "jasmine-spec-reporter": "~4.1.0",
"karma": "~1.7.0", "karma": "~1.7.0",
@ -44,7 +43,7 @@
"karma-jasmine-html-reporter": "^0.2.2", "karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.2", "protractor": "~5.1.2",
"ts-node": "~3.2.0", "ts-node": "~3.2.0",
"tslint": "~5.3.2", "tslint": "~5.7.0",
"typescript": "~2.3.3" "typescript": "~2.4.2"
} }
} }

View File

@ -37,16 +37,20 @@
/** IE10 and IE11 requires the following for NgClass support on SVG elements */ /** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`. // import 'classlist.js'; // Run `npm install --save classlist.js`.
/** IE10 and IE11 requires the following for the Reflect API. */
// import 'core-js/es6/reflect';
/** Evergreen browsers require these. **/ /** Evergreen browsers require these. **/
import 'core-js/es6/reflect'; // Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
import 'core-js/es7/reflect'; import 'core-js/es7/reflect';
/** /**
* Required to support Web Animations `@angular/animation`. * Required to support Web Animations `@angular/platform-browser/animations`.
* Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation
**/ **/
import 'web-animations-js'; import 'web-animations-js';

View File

@ -15,7 +15,8 @@
"forin": true, "forin": true,
"import-blacklist": [ "import-blacklist": [
true, true,
"rxjs" "rxjs",
"rxjs/Rx"
], ],
"import-spacing": true, "import-spacing": true,
"indent": [ "indent": [
@ -135,8 +136,6 @@
"use-pipe-transform-interface": true, "use-pipe-transform-interface": true,
"component-class-suffix": true, "component-class-suffix": true,
"directive-class-suffix": true, "directive-class-suffix": true,
"no-access-missing-member": true,
"templates-use-public": true,
"invoke-injectable": true "invoke-injectable": true
} }
} }

View File

@ -15,28 +15,27 @@
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@angular/animations": "^5.0.0-rc.7", "@angular/animations": "^5.0.0",
"@angular/common": "^5.0.0-rc.7", "@angular/common": "^5.0.0",
"@angular/compiler": "^5.0.0-rc.7", "@angular/compiler": "^5.0.0",
"@angular/core": "^5.0.0-rc.7", "@angular/core": "^5.0.0",
"@angular/forms": "^5.0.0-rc.7", "@angular/forms": "^5.0.0",
"@angular/http": "^5.0.0-rc.7", "@angular/http": "^5.0.0",
"@angular/platform-browser": "^5.0.0-rc.7", "@angular/platform-browser": "^5.0.0",
"@angular/platform-browser-dynamic": "^5.0.0-rc.7", "@angular/platform-browser-dynamic": "^5.0.0",
"@angular/router": "^5.0.0-rc.7", "@angular/router": "^5.0.0",
"core-js": "^2.4.1", "core-js": "^2.4.1",
"rxjs": "^5.5.0", "rxjs": "^5.5.2",
"web-animations-js": "^2.3.1",
"zone.js": "^0.8.14" "zone.js": "^0.8.14"
}, },
"devDependencies": { "devDependencies": {
"@angular/cli": "^1.5.0-rc.5", "@angular/cli": "1.5.0",
"@angular/compiler-cli": "^5.0.0-rc.7", "@angular/compiler-cli": "^5.0.0",
"@angular/language-service": "^5.0.0-rc.7", "@angular/language-service": "^5.0.0",
"@types/jasmine": "~2.5.53", "@types/jasmine": "~2.5.53",
"@types/jasminewd2": "~2.0.2", "@types/jasminewd2": "~2.0.2",
"@types/node": "~6.0.60", "@types/node": "~6.0.60",
"codelyzer": "~3.1.1", "codelyzer": "~3.2.0",
"jasmine-core": "~2.6.2", "jasmine-core": "~2.6.2",
"jasmine-spec-reporter": "~4.1.0", "jasmine-spec-reporter": "~4.1.0",
"karma": "~1.7.0", "karma": "~1.7.0",
@ -47,7 +46,7 @@
"karma-jasmine-html-reporter": "^0.2.2", "karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.2", "protractor": "~5.1.2",
"ts-node": "~3.2.0", "ts-node": "~3.2.0",
"tslint": "~5.3.2", "tslint": "~5.7.0",
"typescript": "~2.4.2" "typescript": "~2.4.2"
} }
} }

View File

@ -66,7 +66,7 @@
'@angular/forms/testing': 'ng:forms-builds/master/bundles/forms-testing.umd.js', '@angular/forms/testing': 'ng:forms-builds/master/bundles/forms-testing.umd.js',
// other libraries // other libraries
'rxjs': 'npm:rxjs@5.0.1', 'rxjs': 'npm:rxjs@5.5.2',
'tslib': 'npm:tslib/tslib.js', 'tslib': 'npm:tslib/tslib.js',
'angular-in-memory-web-api': 'npm:angular-in-memory-web-api@0.4/bundles/in-memory-web-api.umd.js', 'angular-in-memory-web-api': 'npm:angular-in-memory-web-api@0.4/bundles/in-memory-web-api.umd.js',
'ts': 'npm:plugin-typescript@5.2.7/lib/plugin.js', 'ts': 'npm:plugin-typescript@5.2.7/lib/plugin.js',

View File

@ -52,7 +52,7 @@
'@angular/upgrade/static': 'npm:@angular/upgrade/bundles/upgrade-static.umd.js', '@angular/upgrade/static': 'npm:@angular/upgrade/bundles/upgrade-static.umd.js',
// other libraries // other libraries
'rxjs': 'npm:rxjs@5.0.1', 'rxjs': 'npm:rxjs@5.5.2',
'tslib': 'npm:tslib/tslib.js', 'tslib': 'npm:tslib/tslib.js',
'angular-in-memory-web-api': 'npm:angular-in-memory-web-api@0.4/bundles/in-memory-web-api.umd.js', 'angular-in-memory-web-api': 'npm:angular-in-memory-web-api@0.4/bundles/in-memory-web-api.umd.js',
'ts': 'npm:plugin-typescript@5.2.7/lib/plugin.js', 'ts': 'npm:plugin-typescript@5.2.7/lib/plugin.js',

View File

@ -13,19 +13,19 @@
"author": "", "author": "",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@angular/animations": "~4.3.1", "@angular/animations": "~5.0.0",
"@angular/common": "~4.3.1", "@angular/common": "~5.0.0",
"@angular/compiler": "~4.3.1", "@angular/compiler": "~5.0.0",
"@angular/compiler-cli": "~4.3.1", "@angular/compiler-cli": "~5.0.0",
"@angular/core": "~4.3.1", "@angular/core": "~5.0.0",
"@angular/forms": "~4.3.1", "@angular/forms": "~5.0.0",
"@angular/http": "~4.3.1", "@angular/http": "~5.0.0",
"@angular/platform-browser": "~4.3.1", "@angular/platform-browser": "~5.0.0",
"@angular/platform-browser-dynamic": "~4.3.1", "@angular/platform-browser-dynamic": "~5.0.0",
"@angular/platform-server": "~4.3.1", "@angular/platform-server": "~5.0.0",
"@angular/router": "~4.3.1", "@angular/router": "~5.0.0",
"@angular/upgrade": "~4.3.1", "@angular/upgrade": "~5.0.0",
"angular-in-memory-web-api": "~0.4.6", "angular-in-memory-web-api": "~0.5.0",
"core-js": "^2.4.1", "core-js": "^2.4.1",
"express": "^4.14.1", "express": "^4.14.1",
"rxjs": "^5.5.0", "rxjs": "^5.5.0",
@ -34,8 +34,7 @@
"zone.js": "^0.8.4" "zone.js": "^0.8.4"
}, },
"devDependencies": { "devDependencies": {
"@angular/cli": "^1.3.1", "@angular/cli": "1.5.0",
"@ngtools/webpack": "^1.2.11",
"@types/angular": "^1.5.16", "@types/angular": "^1.5.16",
"@types/angular-animate": "^1.5.5", "@types/angular-animate": "^1.5.5",
"@types/angular-cookies": "^1.4.2", "@types/angular-cookies": "^1.4.2",
@ -77,7 +76,7 @@
"source-map-explorer": "^1.3.2", "source-map-explorer": "^1.3.2",
"ts-node": "^3.3.0", "ts-node": "^3.3.0",
"tslint": "^3.15.1", "tslint": "^3.15.1",
"typescript": "~2.3.2" "typescript": "2.4.2"
}, },
"repository": {} "repository": {}
} }

File diff suppressed because it is too large Load Diff

View File

@ -72,7 +72,7 @@ var rulesToApply = [
{ {
pattern: 'script', pattern: 'script',
from: 'node_modules/rxjs/bundles/Rx.js', from: 'node_modules/rxjs/bundles/Rx.js',
to: 'https://unpkg.com/rxjs@5.0.1/bundles/Rx.js' to: 'https://unpkg.com/rxjs@5.5.2/bundles/Rx.js'
}, },
{ {
pattern: 'script', pattern: 'script',