anit
anit

Reputation: 1606

Backbone.js views within views

I am trying to create a single page webapp. There are two divs, right div and left div. Left div contains a tree view. On selecting a particular node from tree view associated list of data is loaded in the right div. Again from selecting any data from that right list, the right div re renders with detailed description of that data and also changes the hash. However when i refresh the page the whole hierarchy is lost. How can prevent that from happening? How can I preserve that hierarchy even after refresh?

Upvotes: 1

Views: 169

Answers (1)

fguillen
fguillen

Reputation: 38792

Use Backbone.Router, you have to define a system of unique urls for any state of your hierarchy, modify the url each time your hierarchy changes and create a Router method that is able to recreate the hierarchy from each unique url.

Upvotes: 1

Related Questions