File

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

Metadata

Selector [cxFeatureLevel]

Index

Inputs
Accessors

Constructor

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

Inputs

cxFeatureLevel

Accessors

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

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

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

result-matching ""

    No results matching ""