0

I'm sorry not good at English well, please understand the subject is not good.

I am creating a SPA with angular.js.

I want to change or append view by path using ng-route.

For example,

<div id="topMenu" ng-controller="MainMenuController as mainMenuCtrl">
 <a href="#/menu1" ng-show="menuSelected('menu1')">menu1</a>
 <a href="#/menu2" ng-show="menuSelected('menu2')">menu2</a></div>
<div>
  <div id="leftMenu"><!-- Sub menus for each main menu. path= #/(menu1|menu2) --></div>
  <div id="content"><!-- Contents for each submenus path= #/(menu1|menu2)/{someSubMenu}/{contentName}--></div>

When the select top menu, then leftMenu shuld be changed. And I access the link which is #/menu1/someContent then leftMenu and content should be changed.

What I have to do implementing these process?

Minkyu Kim
  • 1,144
  • 3
  • 18
  • 43
  • 1
    You have to use $stateProvider from angular-ui-router . See http://stackoverflow.com/questions/30370716/state-provider-and-route-provider-in-angularjs – Naveen Sep 06 '16 at 09:02
  • @NaveenAechan Awesome! I'll try it. Thanks a lot! – Minkyu Kim Sep 06 '16 at 09:05

0 Answers0