diff options
Diffstat (limited to 'client/src/app/search/search.component.ts')
-rw-r--r-- | client/src/app/search/search.component.ts | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/client/src/app/search/search.component.ts b/client/src/app/search/search.component.ts index 3d17e6d96..474b72824 100644 --- a/client/src/app/search/search.component.ts +++ b/client/src/app/search/search.component.ts | |||
@@ -1,7 +1,6 @@ | |||
1 | import { Component, OnDestroy, OnInit } from '@angular/core' | 1 | import { Component, OnDestroy, OnInit } from '@angular/core' |
2 | import { ActivatedRoute, Router } from '@angular/router' | 2 | import { ActivatedRoute, Router } from '@angular/router' |
3 | import { AuthService } from '@app/core' | 3 | import { AuthService, Notifier } from '@app/core' |
4 | import { NotificationsService } from 'angular2-notifications' | ||
5 | import { forkJoin, Subscription } from 'rxjs' | 4 | import { forkJoin, Subscription } from 'rxjs' |
6 | import { SearchService } from '@app/search/search.service' | 5 | import { SearchService } from '@app/search/search.service' |
7 | import { ComponentPagination } from '@app/shared/rest/component-pagination.model' | 6 | import { ComponentPagination } from '@app/shared/rest/component-pagination.model' |
@@ -40,7 +39,7 @@ export class SearchComponent implements OnInit, OnDestroy { | |||
40 | private route: ActivatedRoute, | 39 | private route: ActivatedRoute, |
41 | private router: Router, | 40 | private router: Router, |
42 | private metaService: MetaService, | 41 | private metaService: MetaService, |
43 | private notificationsService: NotificationsService, | 42 | private notifier: Notifier, |
44 | private searchService: SearchService, | 43 | private searchService: SearchService, |
45 | private authService: AuthService | 44 | private authService: AuthService |
46 | ) { } | 45 | ) { } |
@@ -68,7 +67,7 @@ export class SearchComponent implements OnInit, OnDestroy { | |||
68 | this.search() | 67 | this.search() |
69 | }, | 68 | }, |
70 | 69 | ||
71 | err => this.notificationsService.error('Error', err.text) | 70 | err => this.notifier.error(err.text) |
72 | ) | 71 | ) |
73 | } | 72 | } |
74 | 73 | ||
@@ -112,9 +111,7 @@ export class SearchComponent implements OnInit, OnDestroy { | |||
112 | this.firstSearch = false | 111 | this.firstSearch = false |
113 | }, | 112 | }, |
114 | 113 | ||
115 | error => { | 114 | err => this.notifier.error(err.message) |
116 | this.notificationsService.error(this.i18n('Error'), error.message) | ||
117 | } | ||
118 | ) | 115 | ) |
119 | 116 | ||
120 | } | 117 | } |