docs: update api-in-mem-web-api to v.0.0.8

This commit is contained in:
Ward Bell 2016-05-19 21:50:26 -07:00
parent feec37b784
commit 6e0f80c673
4 changed files with 5 additions and 4 deletions

View File

@ -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": {

View File

@ -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": {

View File

@ -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": {

View File

@ -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
} }