ngOnInit(){
this.gridOptions = {};
this.gridOptions.rowData = [];
this.gridOptions.rowData = [
{configName: 1, configName1: "Jarryd", configName2: "Hayne", configName3: "tttttt", configName4: "rrrtttt",
configName5:"drrrrrr"}];
}
硬编码值正在加载到表中。但是内部服务动态值没有加载。
this.service.getData(fields).subscribe(data => {
data.be.forEach(element => {
let tableData = {configName: element.configName, configName1: element.configName1, configName2: element.configName2, configName3: element.configName3, configName4: element.configName4, configName5:element.configName5}
this.gridOptions.rowData.push(tableData )
}
}