angualr不支持对象遍历循环,需要用object.keys将对象变成数组; objectKeys = Object.keys;test={id:'1',name:'hello'}html中*ngFor="let key of objectKeys(test);