Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- find() {
- return this._http.get('api/items')
- .map((res:Response) => res.json())
- .publishReplay(1)
- .refCount();
- }
- ngOnInit() {
- this.itemService.find().subscribe((data) => {
- this.gridOptions.rowData = data;
- this.loaded = true;
- });
- }
- ngOnInit() {
- let find = this.byType ? this.itemService.findByType : this.itemService.find;
- find(this.filter).subscribe((data) => {
- this.gridOptions.rowData = data;
- this.loaded = true;
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement