I'm pursuing an issue as I wanted to add a class to the selected li and to 
the parent li after a click. we don't want to use template or templateURL 
in the directive as I want to use plain HTML menu with angular menu 

I have tried but no luck. Can we achieve this using some tricky way?


            <li menu>Submenu11</li>
            <li menu>Submenu12</li>
            <li menu>Submenu13</li>
        Menu 2
            <li menu>Submenu21</li>
            <li menu>Submenu22</li>
            <li menu>Submenu23</li>


 .directive("menu", function () {       
      return {
        restrict: 'EA',      
        link: function(scope, elem, attrs) {
            angular.element(document.querySelector('.menu li 
            elem.bind("click", function() {



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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to