I have a problem with the deprecation of onParameterChaned event on 1.9. I’m unable to send parameters using router.pushi have a main page with and external js file, and the page what i need to navigate to is on a separate .ux file with another external js file. I have the following code on the main page
Thanks Ahmed, tried that, but i get the same result. If i can’t fix this, my next step is rolling back to 1.8.1, because i have the app almost complete and this is dragging me out of my deadline
After pulling my hair for hours, i found an answer on this post that make figureout what was my mistake
<App Background="#263238">
<!-- Global -->
<UserEvent Name="routeContent" />
<OnUserEvent EventName="routeContent" Handler="{routeContent}" />
<JavaScript File="external.js" />
<Router ux:Name="router" />
<Navigator Dock="Fill" DefaultPath="main">
<Page ux:Template="main">
<ScrollView>
<homepage />
</ScrollView>
</Page>
<!-- This call will fire the Parameter.onValueChanged correctly -->
<content Background="#4266AB" ux:Template="contentPage" />
<Page ux:Template="contentPage_b">
<!--
This call will not, because the parameter is sent to the page contentPage_b and not into the <content> object
To make it works, the content shold be direct child of the Navigator object
-->
<content Background="#4266AB" />
</Page>
</Navigator>
</App>
I was triying to catch the value on a chldren of a page element, but the problem was that the parameter is allways sent directly to the Page. Now it’s working.
Thanks and i hope it will help someone that make this easy mistake