File

projects/dvk/src/lib/content-conductor/content/content.directive.ts

Description

A directive that must be used as a structural directive so that the TemplateRef is injected.

Implements

Content

Example

<span *dvk-content>Some Content To Display In A Container</span>

Metadata

selector [dvk-content]

Index

Inputs

Constructor

constructor(templateRef: TemplateRef)
Parameters :
Name Type Optional
templateRef TemplateRef<any> no

Inputs

dvk-content

Type: string

Accessors

template
gettemplate()
import { Directive, TemplateRef, Input, AfterViewInit } from '@angular/core';
import { Subject, BehaviorSubject } from 'rxjs';
import { Content } from './content.model';

/**
 * A directive that must be used as a structural 
 * directive so that the TemplateRef is injected.
 * 
 * @example
 * <span *dvk-content>Some Content To Display In A Container</span>
 */
@Directive({
  selector: '[dvk-content]'
})
export class ContentDirective implements Content {
  @Input('dvk-content') initialContainerName: string;

  get template() { return this.templateRef; }

  constructor(private templateRef: TemplateRef<any>) {
    
  }
}

results matching ""

    No results matching ""