UNPKG

ng2-materialize

Version:

An Angular 2+ wrap around Materialize library

55 lines (54 loc) 1.74 kB
import { ApplicationRef, ComponentFactoryResolver, ComponentRef, Injector, Type } from '@angular/core'; export declare class MzInjectionService { private applicationRef; private componentFactoryResolver; private injector; private container; constructor(applicationRef: ApplicationRef, componentFactoryResolver: ComponentFactoryResolver, injector: Injector); /** * Appends a component to an adjacent location. * * @template T * @param {Type<T>} componentClass * @param {*} [options={}] * @param {Element} [location=this.getContainerElement()] * @returns {ComponentRef<T>} * @memberof MzInjectionService */ appendComponent<T>(componentClass: Type<T>, options?: any, location?: Element): ComponentRef<T>; /** * Overrides the default container element. * * @param {Element} container * @memberof MzInjectionService */ setRootViewContainer(container: Element): void; /** * Gets the html element for a component ref. * * @private * @param {ComponentRef<any>} componentRef * @returns {Element} * @memberof MzInjectionService */ private getComponentRootNode(componentRef); /** * Gets the container element. * * @private * @returns {Element} * @memberof MzInjectionService */ private getContainerElement(); /** * Projects the inputs onto the component. * * @private * @template T * @param {ComponentRef<T>} component * @param {*} options * @returns {ComponentRef<T>} * @memberof MzInjectionService */ private projectComponentInputs<T>(component, options); }