File

src/app/providers/services/material.service.ts

Index

Methods

Methods

upgradeDom
upgradeDom()
Returns : any
import { Injectable } from '@angular/core';

interface ComponentHandler {
  upgradeDom();
}

declare var componentHandler: ComponentHandler;

@Injectable()
export class MaterialService {
  handler: ComponentHandler;
  constructor() {
    this.handler = componentHandler;
  }

  // render on next tick
  render() {
    setTimeout(() => {
      if (!this.handler) {
        console.log('componentHandler is missing!');
        return;
      }
      this.handler.upgradeDom();
    }, 0);
  }
}

results matching ""

    No results matching ""