Sending parameters from Raised Event not working

Something weird happening when i try to navigate to another page from a raised event in a component. I want to send data along with the route but the next page’s this.Parameter is null. It navigates to the page the but there’s no data. I’ve navigated to different pages with data in the same app. Is there something specific about sending data because of a raised event?

Here’s a repo to see the issue

Fuse version 1.4.0 (build 14778)
Copyright © 2017 Fusetools

Mac os High Sierra

Hi Alex,

checked the code, and I don’t think this has to do with UserEvents in any way. It all has to do with how you’re treating this.Parameter in appointment.js.

In particular, you’re expecting it to be always there, always with the latest data. The procedural console.log() statements you have there suggest exactly that:

var sPhysician = this.Parameter;

function init() {
    console.log("Loading Appointment")
    //This should be doctor object

This is not how it works. this.Parameter is reactive, populated asynchronously, which means that the value of it arrives later, some time in the future. You should read about State Observables and derived Observables to understand the difference.

The solution then is to use reactive operators (such as .map()) to subscribe to this.Parameter, as explained in the Tutorial.

Thanks Uldis