2016-08-08 8 views
0

ng2コンポーネントでag-gridをラップしました。グリッド角度2のヘッダテンプレート

最初のヘッダーを親機能のチェックボックスにします。

どのようにしてコンテナコンポーネントから行うことができますか?

AG-grid.component

@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>(); 
    } 

答えて

1

AG-グリッドヘッダの角度2つのコンポーネントをサポートしていない

@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[]; 
} 

コンテナコンポーネント。私たちが現在取り組んでいることであり、今から3週間後にリリースする予定です。おそらくv8.0.0になります(今週はv7.2.0をリリースし、次のメジャーバージョンには新しいヘッダーが追加されます)。

+0

ありがとうございますNiallあなたは最高です! –

関連する問題