I am creating AngularJS app for tutorials where I need to populate tutorial data from service and show it in three panels on UI. First panel contains list of Topics, 2nd - list of subtopics and 3rd one contains data.
initially when we haven't selected any topics, service should return subtopics of 1 topic and data of the 1st subtopic.
While you click on any other subtopic, then service should return the data for the give subtopic. But as soon as the state gets changed controller is getting re-instantiated and losing the data of topic/subtopic list which we initially shown on UI.
Please refer POC at http://embed.plnkr.co/v16rd5v1IjB14btfY7PQ/
possible solution - when we click on any of the subtopic, we should overpopulate tops/subtopics data somewhere from localstorage or sessionStorage and merge it with the service data which will have the desired output.
Is there any other way to implement 3 level dynamic navigation using Angular?