File

projects/ngx-list-view/src/lib/components/date-filter/ngx-date-filter.component.ts

Metadata

selector ngx-date-filter
templateUrl ngx-date-filter.component.html

Index

Properties
Methods
Inputs

Inputs

filterEmitter

Type: EventEmitter<any>

name

Type: string

title

Type: string

Methods

Public changeValue
changeValue(value: string)
Parameters :
Name Type Optional
value string no
Returns : void

Properties

Public value
value: string
Type : string
Default value : ''
import {Component, Input, EventEmitter} from '@angular/core';

@Component({
    selector: 'ngx-date-filter',
    templateUrl: 'ngx-date-filter.component.html'
})
export class NgxDateFilterComponent {

    @Input() public title: string;
    @Input() public name: string;
    public value = '';
    @Input() public filterEmitter: EventEmitter<any>;

    public changeValue(value: string) {
        this.value = value;
        this.filterEmitter.emit({
            name: this.name,
            value: value,
            operator: '='
        });
    }

}

<label>{{title}}</label>
<input type="date"
   class="form-control"
   style="width:155px;display:inline-block"
   [ngModel]="value"
   (ngModelChange)="changeValue($event)"
/>

Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""