0

I am using navgoco.js and angular js in an application and I have following html

    <div id="demo">
   <ul >
       <li ng-repeat ... >
          <a href="#"> ... </a>  
          ......
      </li>
   </ul>
</div>

js code

$j("#demo1").navgoco({accordion: false});

It is supposed to do some expand-collapse of menus.

the problem is that navgoco events are not performing on clicking on anchor. It simply adds # to url. In the rendered html of anchor tag, anuglar is adding ng-binding that may be the problem. Please help.

hard coder
  • 5,449
  • 6
  • 36
  • 61
  • Hello, i'm not sur but you can use this $locationProvider .html5Mode(true); for disable prefix of url [link](http://stackoverflow.com/questions/16677528/location-switching-between-html5-and-hashbang-mode-link-rewriting). Good luck – Allel Aug 18 '14 at 09:50
  • Please, share you solution, if you found any. – sr9yar Apr 04 '17 at 20:42

2 Answers2

0

You could just remove the href="#" from the a tag to prevent angularjs to intercept the event.

Also see: $location guide at "Html link rewriting" section.

runTarm
  • 11,537
  • 1
  • 37
  • 37
0

the <a> tag is a directive in angularjs. see https://docs.angularjs.org/api/ng/directive/a

sss
  • 1,259
  • 9
  • 23