docs: update api-in-mem-web-api to v.0.0.8
This commit is contained in:
parent
feec37b784
commit
6e0f80c673
|
@ -38,7 +38,7 @@
|
||||||
"rxjs": "5.0.0-beta.6",
|
"rxjs": "5.0.0-beta.6",
|
||||||
"zone.js": "^0.6.12",
|
"zone.js": "^0.6.12",
|
||||||
|
|
||||||
"angular2-in-memory-web-api": "0.0.7",
|
"angular2-in-memory-web-api": "0.0.8",
|
||||||
"bootstrap": "^3.3.6"
|
"bootstrap": "^3.3.6"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
"rxjs": "5.0.0-beta.6",
|
"rxjs": "5.0.0-beta.6",
|
||||||
"zone.js": "0.6.12",
|
"zone.js": "0.6.12",
|
||||||
|
|
||||||
"angular2-in-memory-web-api": "0.0.7",
|
"angular2-in-memory-web-api": "0.0.8",
|
||||||
"bootstrap": "^3.3.6"
|
"bootstrap": "^3.3.6"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
"rxjs": "5.0.0-beta.6",
|
"rxjs": "5.0.0-beta.6",
|
||||||
"zone.js": "^0.6.12",
|
"zone.js": "^0.6.12",
|
||||||
|
|
||||||
"angular2-in-memory-web-api": "0.0.7",
|
"angular2-in-memory-web-api": "0.0.8",
|
||||||
"bootstrap": "^3.3.6"
|
"bootstrap": "^3.3.6"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
|
@ -49,7 +49,8 @@ export class HeroesComponent implements OnInit {
|
||||||
this._heroService
|
this._heroService
|
||||||
.delete(hero)
|
.delete(hero)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
this.heroes = this.heroes.filter(h => h.id !== hero.id);
|
this.heroes = this.heroes.filter(h => h !== hero);
|
||||||
|
if (this.selectedHero === hero) { this.selectedHero = null; }
|
||||||
})
|
})
|
||||||
.catch(error => this.error = error); // TODO: Display error message
|
.catch(error => this.error = error); // TODO: Display error message
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue