I am facing an issue where the title is not displayed as expected based on the environment value in appConfig.json.
appConfig.json
"env": "stage",
app.component.ts
env: string;
constructor(
private configService: ConfigService
) {}
ngOnInit() {
this.environment = this.configService.config.env;
};
app.component.html
<ng-template [ngSwitch]="env">
<span *ngSwitchCase="'production'">Title Production</span>
<span *ngSwitchCase="'stage'">Title Stage</span>
<span *ngSwitchDefault>Title Default</span>
</ng-template>