Hi!
I am trying to pass a user_id from one page to another, but I can’t find out how to read the id in the pageInit event. Maybe someone can give me the right hint why this was working in v1.x and what I am doing wrong in v2.
Thanks in advance!
Routing event:
{
name: 'chat',
path: '/chat/',
url: './pages/chat.html',
on: {
pageInit: function (event, page) {
console.log(page.context.user_id);
}
}
}
Opening the new page:
app.router.navigate('/chat/', {
context: { user_id: 42 }
});