File

projects/angular2-query-builder/src/lib/query-builder/query-input.directive.ts

Metadata

selector [queryInput]

Inputs

queryInputType

Unique name for query input type.

Type: string

Constructor

constructor(template: TemplateRef)

Properties

Private _type
_type: string
template
template: TemplateRef<any>
import { Directive, Input, TemplateRef } from '@angular/core';

@Directive({selector: '[queryInput]'})
export class QueryInputDirective {
  /** Unique name for query input type. */
  @Input()
  get queryInputType(): string { return this._type; }
  set queryInputType(value: string) {
    // If the directive is set without a type (updated programatically), then this setter will
    // trigger with an empty string and should not overwrite the programatically set value.
    if (!value) { return; }
    this._type = value;
  }
  private _type: string;

  constructor(public template: TemplateRef<any>) {}
}

results matching ""

    No results matching ""