$routeProvider vs $stateProvider in AngularJS
$routeProvider vs $stateProvider |
$routeProvider
.when('/home',{
tempalteUrl: 'home.html'
})
<a href="#/home">Home<a>
$location.url('/home')
$stateProvider
.state('home',{
url:'/home',
templateUrl:'home.html'
})
<a ui-sref="home">Home</a>
$state.go("home")