samedi 18 avril 2015

Go back button to load related html from javascript template

I'm using JavaScript templating for my application, something similar to this:



<script id="my-template" type="text/template">
<!-- Template here -->
</script>


Where contents of each such template are loaded into #container div based on what action users perform.


Issue with this is that it all happens on same page, thus when users click back and forward buttons in the browser they will go to previous webpage they were on instead to related screen in my application. Is there a way say if I add #my-template-id string to my url when the template is loaded or something to know what page to go to / what template to load?


Aucun commentaire:

Enregistrer un commentaire