So far as I can tell, my component inside an ngSwitch container is just not loading! I’ve been hacking away at it all day, and I think I’ve narrowed it down to that. I’ve simplified the code inside my template to this:
ion-content padding>
{{page}} <!-- test-->
<div [ngSwitch]="page">
<div class="container" *ngSwitchCase="'instructions'">
<h3 text-center>Time to set up your device</h3>
</div>
<div class="container" *ngSwitchCase="'chooseNetwork'">
<h3 text-center>Choose Network</h3>
<appearance-animation-layout-5
[data]="params.data"
[events]="params.events">
</appearance-animation-layout-5>
</div>
</div>
End of Case Statement
<appearance-animation-layout-5
[data]="params.data"
[events]="params.events">
</appearance-animation-layout-5>
</ion-content>
Now, when this page loads, the page is set to instructions. At this point, params is null. So so component shows. But the Heading text shows OK. When the user clicks a button (I put it in the footer to debug), the page is changed. The new heading shows correctly, but no sign of my component (appearance animation). This worked fine before I put it in the container, so I stuck another instance of it outside to check. And sure enough, when the user clicks the button, up it comes. Absolutely no idea what is going on.
The component and the pages are all lazy loaded. My understanding of this is limited, but I’m following what I gather to be a correct recipe. And it works for everything else in my app. Anyone know what’s going on??? It’s causing me to turn purple and hold my breath for hours at a time while steam comes out of my ears.
I’ve run npm update -g cordova ionic so everything should be up to date…