Simply check the production variable present in the environment file, it will be true for production mode and false for development.
import { environment } from 'src/environments/environment';
if (environment.production) {
// for production
} else {
// for development
}