projects/i-components/src/lib/components/xam-grid/test/samplexamgridusage.component.ts
Properties |
|
Accessors |
constructor(name?: string, bdate?: Date)
|
Private _birthDate |
Type : Date
|
Private _name |
Type : string
|
name | ||||||
getname()
|
||||||
setname(v: string)
|
||||||
Parameters :
Returns :
void
|
birthDate | ||||||
getbirthDate()
|
||||||
setbirthDate(v: Date)
|
||||||
Parameters :
Returns :
void
|
import { Component } from '@angular/core';
import { ClassInfo, propertyInfo, XamGridModel } from '@mobilize/wms-framework';
@Component({
template: `
<wm-xam-grid [model]="grid">
<wm-xam-grid-columns>
<wm-xam-grid-text-column [key]="'name'"> </wm-xam-grid-text-column>
<wm-xam-grid-text-column [key]="'birthDate'"> </wm-xam-grid-text-column>
</wm-xam-grid-columns>
</wm-xam-grid>
`,
})
export class SampleXamGridUsageComponent {
grid: XamGridModel;
constructor() {
this.grid = new XamGridModel();
}
}
@ClassInfo({
classId: 'PersonDto',
})
export class PersonDto {
private _name: string;
constructor(name?: string, bdate?: Date) {
if (name && bdate) {
this.name = name;
this.birthDate = bdate;
}
}
@propertyInfo()
public get name(): string {
return this._name;
}
public set name(v: string) {
this._name = v;
}
private _birthDate: Date;
@propertyInfo()
public get birthDate(): Date {
return this._birthDate;
}
public set birthDate(v: Date) {
this._birthDate = v;
}
}