File

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

Index

Properties
Methods

Constructor

constructor()

Methods

render
render()
Returns : void

Properties

handler
Type : ComponentHandler
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 ""