HistoryManager
HistoryManager copied to clipboard
hashChanged to no hash
Hi Arieh,
This is a great plugin you published here. I'm using the HashListener part for some basic ajax loading and all works well except one little thing :
- When the initial load occurs there is no hash in the URL, for instance http://myweb.site/some/page
- The user clicks a hash link http://myweb.site/some/page#withdata , and HashListener do its magic thing to handle it and load content from Ajax.
- But, if the user go back (through its browser button) to http://myweb.site/some/page the hash diseapears without the "hashChanged" being fired.
I wonder if it is browser limitation, or if there is a way to handle it ?
This will actually fire the "removed" event. In my case I can call the function below.
this.HM.addEvent('page:removed', function (){
this.HM.set('page', 'get_started');
}.bind(this))