projects/i-components/src/lib/directives/container.directive.ts
Directive to provide ViewContainerRef on containers.
Selector | [wmContainer] |
Properties |
|
constructor(viewContainerRef: ViewContainerRef)
|
||||||
Creates an instance of ContainerDirective.
Parameters :
|
Public viewContainerRef |
Type : ViewContainerRef
|
Reference to the view containerRef for the component that contains the directive |
import { Directive, ViewContainerRef } from '@angular/core';
/**
* Directive to provide ViewContainerRef on containers.
*
* @export
* @class ContainerDirective
*/
@Directive({
selector: '[wmContainer]',
})
export class ContainerDirective {
/**
* Reference to the view containerRef for the component that contains the directive
*
* @type {ViewContainerRef}
* @memberof ContainerDirective
*/
public viewContainerRef: ViewContainerRef;
/* istanbul ignore next */
/**
* Creates an instance of ContainerDirective.
*
* @param {ViewContainerRef} viewContainerRef
* @memberof ContainerDirective
*/
constructor(viewContainerRef: ViewContainerRef) {
this.viewContainerRef = viewContainerRef;
}
}