Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export class Loader {
- constructor(
- descripcion: string,
- tipo?: string,
- isLoading: boolean
- ) {
- this.isLoading = false;
- }
- on() {
- this.isLoading = true;
- this.clone();
- }
- off() {
- this.isLoading = false;
- this.clone();
- }
- clone() {
- this = Object.assign({}, this);
- }
- }
- /**** Ej ****/
- // para inicializar
- controlsLoading = {
- holdings: new Loader('holdings)
- }
- // cuando termine de cargar
- this.controlsLoading.off();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement