File

projects/i-components/src/lib/directives/container.directive.ts

Description

Directive to provide ViewContainerRef on containers.

Metadata

Selector [wmContainer]

Index

Properties

Constructor

constructor(viewContainerRef: ViewContainerRef)

Creates an instance of ContainerDirective.

Parameters :
Name Type Optional
viewContainerRef ViewContainerRef No

Properties

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;
  }
}

result-matching ""

    No results matching ""