I have something like this
enviroment.ts
export const environment = {
production: false
};
And in app.module.ts
I have something like this
@NgModule({
declarations: [AppComponent, VersionComponent],
imports: [],
providers: [],
bootstrap: [AppComponent],
})
export class AppModule { }
The problem I have is that based on environment.production i need to declare or not to declare VersionComponent
Something like this
if (environment.production) {VersionComponent}
The problem is that if is not allowed declarations, has someone had similar problem?