Skip to content

Instantly share code, notes, and snippets.

@uno-de-piera
Created January 8, 2018 16:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uno-de-piera/0ab966e0f7a9403da60e3e3869a0fe3c to your computer and use it in GitHub Desktop.
Save uno-de-piera/0ab966e0f7a9403da60e3e3869a0fe3c to your computer and use it in GitHub Desktop.
import { Injectable } from '@angular/core';
import {Observable} from "rxjs/Observable";
@Injectable()
export class AppService {
loading$: Observable<boolean> = Observable.of(false);
constructor() { }
fireLoader() {
this.loading$ = Observable.of(true);
}
stopLoader() {
this.loading$ = Observable.of(false);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment