I have a component which is provided a model object, this model object could be of Several types and what type it is determines what component will be rendered inside:
<div [ngSwitch]="poolModel.runtimeType.toString()">
<template ngSwitchCase="CryptonoteMiningPool"><cryptonote-pool [model]="poolModel"></cryptonote-pool></template>
<template ngSwitchCase="DaggerHashimotoMiningPool"><dag-hash-pool [model]="poolModel"></dag-hash-pool></template>
</div>
This works great in debug mode, but as soon as I compile for release runtimeType always returns "fS".
I have a solution, essentially setting a constant in the model and looking at that, but would rather not have the hassle of that if I can avoid it since I might end up with many types of models to maintain.
Is there a way to make runtimeType return what I expect in release mode?