parent
b4c92d9c9c
commit
0387b810c6
|
@ -15,7 +15,7 @@ import { Hero } from './hero';
|
||||||
})
|
})
|
||||||
export class HeroSearchComponent implements OnInit {
|
export class HeroSearchComponent implements OnInit {
|
||||||
// #docregion search
|
// #docregion search
|
||||||
heroes: Observable<Hero>;
|
heroes: Observable<Hero[]>;
|
||||||
// #enddocregion search
|
// #enddocregion search
|
||||||
// #docregion searchSubject
|
// #docregion searchSubject
|
||||||
searchSubject = new Subject<string>();
|
searchSubject = new Subject<string>();
|
||||||
|
@ -45,7 +45,7 @@ export class HeroSearchComponent implements OnInit {
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
// Todo: real error handling
|
// Todo: real error handling
|
||||||
console.log(error);
|
console.log(error);
|
||||||
return Observable.throw(error);
|
return Observable.of<Hero[]>([]);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// #enddocregion search
|
// #enddocregion search
|
||||||
|
|
Loading…
Reference in New Issue