src/app/providers/services/material.service.ts
Properties |
Methods |
constructor()
|
render |
render()
|
Returns :
void
|
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);
}
}