You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to pass options to a page with data-href-page-options. <button data-href-page="details-page" data-href-page-options='{"title": "Hello World"}'>
/details-page/index.js :
ATV.Page.create({
name: 'DetailsPage',
template: template,
WHAT CODE TO RETRIEVE OPTIONS ?
});
importtemplatefrom'./template.hbs';ATV.Page.create({name: 'details-page',template: template,ready(options,resolve,reject){// the options object has everything that you pass// options.title in your case// use it to do some custom operations and then resolve the promise with your final data// in your case, you can simply pass the entire options object as dataresolve(options);// or you can fetch data through ajax based on your options// then resolve the promise with the provided data}});
Later in some other template you can simply use <button data-href-page="details-page" data-href-page-options='{"title": "Hello World"}'> and atvjs will automatically bind the click handler at runtime to navigate to the details-page.
Let me know if this works, please close the issue if it does. Thanks!
Hello,
I would like to pass options to a page with
data-href-page-options
.<button data-href-page="details-page" data-href-page-options='{"title": "Hello World"}'>
/details-page/index.js :
/details-page/template.hbs :
Thanks.
The text was updated successfully, but these errors were encountered: