-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.ts
33 lines (24 loc) · 870 Bytes
/
example.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import { Component, OnInit, Input } from '@angular/core';
import { OptionsFilter } from './options-filter';
import { ContainsFilter } from './contains_filter';
import { PropertyComparator } from './property_comparator';
@Component({
moduleId: module.id,
selector: 'example',
templateUrl: 'example.html',
style: '',
})
export class ExampleComponent implements OnInit {
users = [{name:'Ichigo', admin_access: 1},{name:'Goku', admin_access: 0}];
selected: any;
pagination = [];
//filters
nameFilter = new ContainsFilter('name');
accessFilter = new OptionsFilter();
accessFilterOptions: any[] = [{ label: "Yes", value: 1 }, { label: "No", value: 0 }];
accessFilterProperty: string = "admin_access";
//comparators
nameComparator = new PropertyComparator('name');
ngOnInit(): void {
}
}