maanantai, 20. tammikuuta 2014 19.45.52 UTC+2 Sander Elias kirjoitti:
>
> Although your sample works now, this is not the right way to approach the 
> problem at hand. You are still using the DOM as source of truth.  In 
> angular it isn't. If you are reading the dome to get some data, you are 
> doing it wrong.
> have a look at this: http://jsfiddle.net/SanderElias/MWmfC/
>

Hello Sander, 

You are of course correct. I got bogged down while trying out the solution 
presented 
here: 
https://ryankaskel.com/blog/2013/05/27/a-different-approach-to-angularjs-navigation-menus
but since I realised I had to have a model (rather than a piece of static 
HTML) backing the menu items (because I may need to hide some of them), 
there of course isn't much point in figuring out the active menu item from 
its path - and I do agree that it's a rather ugly solution even then.

Thank you.

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to