implemented sample references
This commit is contained in:
@ -16,7 +16,8 @@ export class ApiService {
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private storage: LocalStorageService,
|
||||
private modalService: ModalService
|
||||
private modalService: ModalService,
|
||||
private window: Window
|
||||
) { }
|
||||
|
||||
get hostName() {
|
||||
@ -49,6 +50,9 @@ export class ApiService {
|
||||
else {
|
||||
const modalRef = this.modalService.openComponent(ErrorComponent);
|
||||
modalRef.instance.message = 'Network request failed!';
|
||||
modalRef.result.then(() => {
|
||||
this.window.location.reload();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user