I have a very simple webpage that is using Bootstrap3 + AngularJS1.2. The main page uses a fixed nav-bar with some Dropdowm menus.
Each menu item calls the same controller (the only thing that changes is the route parameter). The controller retrieves the data and returns always to the same view (which renders such data).
What I'd like now is how to display a "user-friendly" version of the collection name.
A very quick (and very, very dirty) way to do it could be: pass the view title as a request parameter, which the controller extracts and puts in the view model. Example: http://jsfiddle.net/gC64y/
What it really bad about this (IMHO) is that the title will be visible in the location bar. A cleaner alternative, I believe, would be to have a model in the parent scope that has an array like:
menu = [{'urlPath':'data/collection-first', 'title':'The First Collection'},...]
.. and then pass to the controller just the index of the array element corresponding to the clicked menu item.
However, before start playing with alternatives, I'm curious about what would be recommended way do this in the "Angular-way" (which I'm just learning, by the way).
Thank you,