SHARE
TWEET

Untitled

a guest Mar 22nd, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. export class Loader {
  2.     constructor(
  3.         descripcion: string,
  4.         tipo?: string,
  5.         isLoading: boolean
  6.     ) {
  7.         this.isLoading = false;
  8.     }
  9.  
  10.     on() {
  11.         this.isLoading = true;
  12.         this.clone();
  13.     }
  14.  
  15.     off() {
  16.         this.isLoading = false;
  17.         this.clone();
  18.     }
  19.  
  20.     clone() {
  21.         this = Object.assign({}, this);
  22.     }
  23. }
  24.  
  25.  
  26.  
  27. /**** Ej ****/
  28.  
  29. // para inicializar
  30. controlsLoading = {
  31.     holdings: new Loader('holdings)
  32. }
  33.  
  34. // cuando termine de cargar
  35. this.controlsLoading.off();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top