0

I'm trying to use angularjs with routing in combination with superfish menu. My web application is a MVC application and I use the superfish menu to navigate inside my web application. The superfish menu contains links that allows me to navigate to other views of the MVC application.

One of these views is an angular app with routing. But after this angular app is loaded none of my superfish menus are working anymore, because angular intercepts them and thinks it should be handled by angular routing.

Is there a way let angularjs ignore the anchor links on my superfish menu ? I can not refactor the complete MVC application to a SPA (too big to convert at once), as I'm gradually introducing angular into this MVC application.

I've tried putting on each anchor target="_self" as found in the documentation, but one some occassions, they still get captured by angular (perhaps because some superfish menu items contain only "#" for href (they are parent menus containing submenus)

rekna
  • 5,313
  • 7
  • 45
  • 54

1 Answers1

0

I suggest using a real href rather than #. If there is no suitable destination page then maybe use one of the child items’ hrefs as a default destination for when the top level item is clicked? From what you said about Angular detecting hashes in hrefs, this should solve the problem.

joel_birch
  • 331
  • 1
  • 3
  • When I put a real href on the top level menu item, the browser does a full page reload, which is not the desired result... (e.g. any dynamic loaded content is lost, or any state , like selected items, input elements is lost) – rekna Apr 30 '13 at 20:06