Akash Patil

Akash Patil

  • NA
  • 218
  • 26.8k

angualrjs SateProvider

Feb 4 2016 1:38 AM
hello experts,
 .config(function($stateProvider, $urlRouterProvider){
$stateProvider

.state('main', {
url: "/main",
templateUrl: "templates/main.html",
controller: 'MainCtrl'
})

.state('page2', {
url: "/page2",
templateUrl: "templates/page2.html",
})

// if none of the above states are matched, use this as the fallback
$urlRouterProvider.otherwise('/main');
});
 
aboves are my states..ang below code is on my main.html..when i click on Go to page2..it can not change the url and not navigate on page2....when i change url manualy it works..
plz help thank you
 
 <p>Hello World, how are you?<a href="#/page2.html">Go to page2</a></p>