I’m trying to replace the location strategy by condition prod/dev
console.log(IonicENV.mode) <= this loges true
Then
{ provide: LocationStrategy, useClass: (IonicENV.mode == "prod") ? PathLocationStrateg HashLocationStrategy }
Although IonicEnv.mode returns prod, so the condition is true. but it always goes into using HashlocationStrategy. There is no logical explanation at all…
if I do
{ provide: LocationStrategy, useClass: (console.log(IonicENV.mode == "prod")) ? PathLocationStrategy : HashLocationStrategy }
Then everything works correctly on the server. it meets the true condition and goes into using pathLocationStrategy… Any explanations…anyone??
console.log()always returnundefinedand!!undefinedisfalse. Sois the same as
and is the same as
HashLocationStratege