This seems an easy one, but I couldn\'t find any solution.
So, how do I check if my app is running in production mode or dev mode?
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'
import { enableProdMode } from '@angular/core';
import { AppModule } from './app.module'
platformBrowserDynamic().bootstrapModule(AppModule);
enableProdMode();
This was my code, so I got the same error. I just interchanged line 3 and 4. Then the issue is fixed. So before bootstrapping module we should enable --prod mode.
The correct one can be put in this way,
enableProdMode()
platformBrowserDynamic().bootstrapModule(AppModule);