如何修复类型上不存在的属性“名称”?
代码块:
**Environemnt.prod.ts**
export const environment = {
production: true,
name:"(Production)",
apiUrl: 'https://test.org/getstatusboardvalue',
client_id: '4951-b5a3-0b4a94976aea',
client_secret: '7147f6b98f41',
scope: 'cis',
auth: '',
};
**app.component.ts**
export class AppComponent implements OnInit {
envName = environment.name;
public maintenanceMode: boolean = false;
public scaleLevel = ScaleLevel.Normal;
public get clientBoardTable(): BoardTable {
return this._appService.clientBoardTable;
}
**app.component.html**
<div [ngClass]="{'overlay': maintenanceMode}"></div>
<div [ngClass]="{'smaller': scaleLevel == 1, 'smallest': scaleLevel == 2}" class="main">
<div>
Environemnt<b style="color: red" >{{envName}}</b>
</div>
<div class="page-contents">
<board-table [source]="clientBoardTable"></board-table>
</div>
<div class="page-footer">Data as of: {{clientBoardTable.lastUpdatedOn | date:'medium'}}</div>
</div>
<notification-list></notification-list>
如何获得如下所示的预期结果 预期结果:环境=质量保证 要么 环境=生产
答案 0 :(得分:0)
这可以按预期工作。清理缓存后,我将其重建,并且按预期工作。