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?
You should be careful that you check the return value of the isDevMode()
function.
My setup was failing because i was checking for existence: if (isDevMode)
was always true
, even in production because i declared it with import { isDevMode } from '@angular/core';
.
if (isDevMode())
returned false
correctly.