# Router.Push and this.Parameter.onValueChanged not working properly

**URL:** https://forums.fusetools.com/t/router-push-and-this-parameter-onvaluechanged-not-working-properly/7385
**Category:** How-to Discussions
**Created:** [September 8, 2018, 1:39am UTC](https://forums.fusetools.com/t/router-push-and-this-parameter-onvaluechanged-not-working-properly/7385 "2018-09-08T01:39:09Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![John\_Mohl](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/john_mohl/32/66_2.png) [@John\_Mohl](https://forums.fusetools.com/u/John_Mohl)
#### Post date: [September 8, 2018, 1:39am UTC](https://forums.fusetools.com/t/router-push-and-this-parameter-onvaluechanged-not-working-properly/7385/1 "2018-09-08T01:39:09Z")

</div>

Hi there!

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

```
var routeContent = function(args) {
   console.log(JSON.stringify(args));
   router.push("content", { id: args.id, title: args.title });
}

```

And on the external file of the seccond file

```
this.Parameter.onValueChanged(module, function(param) {
   console.log("ovc: "+JSON.stringify(param));
});

```

But when i receive the new event this.Parameter.onValueChanged on the seccond external js file i get the value undefined. The ouput looks like this

```
[Viewport]: {"node":{"external_object":{}},"name":"routeContent","id":"X0298","kind":"content","title":"Sample content"}
[Viewport]: ovc: undefined

```

Any idea of what i’m doing wrong?

I’ve created a test side project to try to make it work, but i;m getting the same results. You can check the full code here

> **[jmoleiro/Fuse-1.90-Navigation](https://github.com/jmoleiro/Fuse-1.90-Navigation)**
>
> Contribute to jmoleiro/Fuse-1.90-Navigation development by creating an account on GitHub.

Thanks

Jonatan

---

<div class="post-metadata">

### Author: ![Ahmed\_Diab](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/ahmed_diab/32/692_2.png) [@Ahmed\_Diab](https://forums.fusetools.com/u/Ahmed_Diab)
#### Post date: [September 8, 2018, 1:48am UTC](https://forums.fusetools.com/t/router-push-and-this-parameter-onvaluechanged-not-working-properly/7385/2 "2018-09-08T01:48:29Z")

</div>

Hello man,

Are you including that JS file using `file.js:FuseJS` ??

---

<div class="post-metadata">

### Author: ![John\_Mohl](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/john_mohl/32/66_2.png) [@John\_Mohl](https://forums.fusetools.com/u/John_Mohl)
#### Post date: [September 8, 2018, 3:27am UTC](https://forums.fusetools.com/t/router-push-and-this-parameter-onvaluechanged-not-working-properly/7385/3 "2018-09-08T03:27:50Z")

</div>

Yes, i"ve tried with the standard include “\*”, \*js:FuseJS and \*js:Bundle, but i get the same result

---

<div class="post-metadata">

### Author: ![Ahmed\_Diab](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/ahmed_diab/32/692_2.png) [@Ahmed\_Diab](https://forums.fusetools.com/u/Ahmed_Diab)
#### Post date: [September 8, 2018, 3:50am UTC](https://forums.fusetools.com/t/router-push-and-this-parameter-onvaluechanged-not-working-properly/7385/4 "2018-09-08T03:50:07Z")

</div>

You have to use `:Bundle` only okay?  
Then do the following on the terminal :  
1- `fuse kill-all`.  
2- `uno clean`.  
3- `fuse preview`

---

<div class="post-metadata">

### Author: ![John\_Mohl](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/john_mohl/32/66_2.png) [@John\_Mohl](https://forums.fusetools.com/u/John_Mohl)
#### Post date: [September 8, 2018, 11:20am UTC](https://forums.fusetools.com/t/router-push-and-this-parameter-onvaluechanged-not-working-properly/7385/5 "2018-09-08T11:20:00Z")

</div>

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 ☹

---

<div class="post-metadata">

### Author: ![Ahmed\_Diab](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/ahmed_diab/32/692_2.png) [@Ahmed\_Diab](https://forums.fusetools.com/u/Ahmed_Diab)
#### Post date: [September 8, 2018, 12:36pm UTC](https://forums.fusetools.com/t/router-push-and-this-parameter-onvaluechanged-not-working-properly/7385/6 "2018-09-08T12:36:10Z")

</div>

I believe that there are many problem on fuse should be fixed 😉  
Go ahead, fix those problem and create Pull-Request against

---

<div class="post-metadata">

### Author: ![John\_Mohl](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/john_mohl/32/66_2.png) [@John\_Mohl](https://forums.fusetools.com/u/John_Mohl)
#### Post date: [September 9, 2018, 4:43pm UTC](https://forums.fusetools.com/t/router-push-and-this-parameter-onvaluechanged-not-working-properly/7385/7 "2018-09-09T16:43:02Z")

</div>

After pulling my hair for hours, i found an answer on this post that make figureout what was my mistake

> [@Passing data through this.Parameter](https://forums.fusetools.com/t/passing-data-through-this-parameter/2440/24):
>
> Ok… I figure it out and removed the tag from the Navigator and I do see the data. But… How can I see this data inside a .js file? Example console.log(passed-data-variable);

```auto
<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

John
