File
Metadata
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>
|
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;
}
}
Legend
Html element with directive