javascript - Appending to current route in Backbone/Marionette? -
i have part of marionette app opening bootstrap modal. when happens, want register opening "navigate" event, using app.navigate("/modal",false);
change url. in modal view listening history event close modal (useful android / mobile), append "/modal" current route, instead of root.
how can current route/url append "/modal" , call .navigate() function on?
thanks!
edit:
apparently phrase looking here, in terms of web development, "micro-state", explained @ blog here: http://chrisawren.com/posts/implementing-microstates-in-backbone-js
the approach suggested bypass backbone history altogether , directly interface html5 history stack, places need fullscreen modal don't want invoke router handling or change url, still want support button.
simply
router.navigate(router.fragment + "/modal")
Comments
Post a Comment