ag-grid angular 2 header 模板
ag-grid angular 2 header template
我将 ag-grid 包裹在 ng2 组件中。
我希望第一个 header 成为具有 parent 功能的复选框。
如何从容器组件中做到这一点?
ag-grid.component
@Component({
moduleId: module.id,
selector: 'rg-grid',
templateUrl: 'grid-control.component.html',
directives: [AgGridNg2]
})
export class RgGridComponent {
private gridOptions: GridOptions;
private showGrid: boolean;
@Input() rowData: any[];
@Input() columnDefs: AbstractColDef[];
}
容器组件
@Component({
moduleId: module.id,
selector: 'alerts-table',
templateUrl: 'alertsTable.component.html',
directives: [RgGridComponent]
})
export class AlertsTableComponent implements OnInit {
selectedAlert: IAlert;
users: User[];
checkedAlerts : IAlert[];
displayDialog : boolean;
dialogContent : string;
columns : ColDef[];
constructor(private _alertsService: AlertsService, private _usersService: UsersService) {
this.displayDialog = false;
this.investigationRequest = new EventEmitter<number>();
this.columns = [ ??? ]
this.checkedAlerts = new Array<Alert>();
}
ag-Grid 不支持 headers 中的 Angular 2 个组件。这是我们现在正在努力的事情,并希望在三周后发布。它可能是 v8.0.0(我们将在本周推出 v7.2.0,然后下一个主要版本将具有新的 headers)。
我将 ag-grid 包裹在 ng2 组件中。
我希望第一个 header 成为具有 parent 功能的复选框。
如何从容器组件中做到这一点?
ag-grid.component
@Component({
moduleId: module.id,
selector: 'rg-grid',
templateUrl: 'grid-control.component.html',
directives: [AgGridNg2]
})
export class RgGridComponent {
private gridOptions: GridOptions;
private showGrid: boolean;
@Input() rowData: any[];
@Input() columnDefs: AbstractColDef[];
}
容器组件
@Component({
moduleId: module.id,
selector: 'alerts-table',
templateUrl: 'alertsTable.component.html',
directives: [RgGridComponent]
})
export class AlertsTableComponent implements OnInit {
selectedAlert: IAlert;
users: User[];
checkedAlerts : IAlert[];
displayDialog : boolean;
dialogContent : string;
columns : ColDef[];
constructor(private _alertsService: AlertsService, private _usersService: UsersService) {
this.displayDialog = false;
this.investigationRequest = new EventEmitter<number>();
this.columns = [ ??? ]
this.checkedAlerts = new Array<Alert>();
}
ag-Grid 不支持 headers 中的 Angular 2 个组件。这是我们现在正在努力的事情,并希望在三周后发布。它可能是 v8.0.0(我们将在本周推出 v7.2.0,然后下一个主要版本将具有新的 headers)。