Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 1 | /** |
| 2 | * Created by obarda on 3/13/2016. |
| 3 | */ |
| 4 | 'use strict'; |
| 5 | import {EventListenerService} from "./event-listener-service"; |
| 6 | import {EVENTS} from "../utils/constants"; |
| 7 | |
| 8 | export class LoaderService { |
| 9 | |
| 10 | |
| 11 | constructor(private eventListenerService:EventListenerService) { |
| 12 | |
| 13 | } |
| 14 | |
| 15 | public showLoader(...args) { |
| 16 | this.eventListenerService.notifyObservers(EVENTS.SHOW_LOADER_EVENT, ...args); |
| 17 | } |
| 18 | |
| 19 | public hideLoader(...args) { |
| 20 | this.eventListenerService.notifyObservers(EVENTS.HIDE_LOADER_EVENT, ...args); |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | LoaderService.$inject = ['EventListenerService']; |