How can I resolve the error 'Property 'name' does not exist on type' in TypeScript?
Here is the code block :
**Environment.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>
Environment<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>
How can I achieve the desired output as shown below: Desired result : Environment = QA or Environment = PRODUCTION