File

projects/storefrontlib/shared/test/mock-feature-directive.ts

Metadata

Selector [cxFeature]

Index

Inputs
Accessors

Constructor

constructor(templateRef: TemplateRef, viewContainer: ViewContainerRef)
Parameters :
Name Type Optional
templateRef TemplateRef<any> No
viewContainer ViewContainerRef No

Inputs

cxFeature
Type : string

Accessors

cxFeature
setcxFeature(_feature: string)
Parameters :
Name Type Optional
_feature string No
Returns : void
import { Directive, Input, TemplateRef, ViewContainerRef } from '@angular/core';

@Directive({
  selector: '[cxFeature]',
})
export class MockFeatureDirective {
  constructor(
    protected templateRef: TemplateRef<any>,
    protected viewContainer: ViewContainerRef
  ) {}

  @Input() set cxFeature(_feature: string) {
    this.viewContainer.createEmbeddedView(this.templateRef);
  }
}

result-matching ""

    No results matching ""