I have a sidebar that pops in with form. It has a URL for it since it's so commonly used. Going to app.com/foo/add would load the page and open the sidebar. Another view, TopMenu
, has a button to open the sidebar. My question: who triggers the URL change? Should RightSidebar
change the URL with Backbone.navigate
(w/o trigger) or should the button change the URL and call the RightSidebar
's open
method?
-
-
Save OscarGodson/239bc11a4e8c2b46faad to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@techwraith you mean like
app.router.navigate('foo/add', {trigger: true})
? I've read all over trigger is bad and causes issues. @derickbailey has written about it a few times.If you simply mean make an html link to
foo/add
, that would work as it is now, but causes a full page refresh since it's pushState, not hashes. If you mean navigate minus the trigger, this would just change the URL and the app would ignore this.If you mean something other than those three things or a way to make it better, let me know.