$routeProvider vs $stateProvider in AngularJS

$routeProvider vs $stateProvider in AngularJS


routeprovider vs stateprovider
$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")
$routeProvider vs $stateProvider in AngularJS Dev2Tricks 5 of 5
$routeProvider vs $stateProvider in AngularJS $routeProvider vs $stateProvider $routeProvider    .when('/home',{         ...

Share this

Related Posts

Previous
Next Post »

Xolo Offer