Closed garth closed 9 years ago
Hi there!
Great! The silent thing is for changing the url without triggering the the callback. This is helpful when traversing state using for example Cerebral.
Let me just look into that and make a new push to support it!
I agree on removing fragments and url, let me just check that too, thanks! :)
set
is now checking if the url changed before calling the router so perhaps the silent thing is not necessary any more. I've tested in my app with both <a href="/home">home</a>
and signals.urlChanged('/home')
and they both seem to work ok.
Ah, yeah, normally it works, but with Cerebral you can go back and replay state changes. The problem is that you do not want to trigger the callbacks when remembering state because they have already been triggered, but you do want to display the url in the addressbar... if that makes sense :-)
Creating a new push now, got it working. Removed the fragments and url. Will create a new release. Thanks for this!
Not sure what the silent option was doing, but this seems to work without it.
Options can be passed to the router which are forwarded to page.js.
To switch over to pushstate simply remove the
hashbang: true
option.fragments
andurl
have been maintained to support existing stuff, but perhaps should be removed?