My parameter is dynamic so I used the data-binding approach as follows:
I’m passing parameter from the previous page via the URL like #/my-component-data/e123. I’m using standard JavaScript to extract the eventID from the URL as follows:
queryParams: {
type: Object,
value: function() {
var l = new URL(document.location);
var path = l.hash //path from the # char
var eventID = path.split("/").pop();
return {"eventID": eventID};
}
a) The problem I’m having is that the data is not being refresh when I move between different eventID values. Only when I re-load the whole page that’s when it get refreshed. I tried using the script code below but it still not working.
b) another related issue is that I noticed that in the section the variable {{route.path}} has value ‘/e123’. but I can’t seem to be able to access this variable in the section. I tried following code to assign to ‘queryParams’ property but it did work.