Mastering Development

AngularJS and ui-router: wrong routes behaviour after refresh

I’m developing an application with AngujarJS and ui-router and I’m having a problem loading the routes. To facilitate the explanation I will delete parts of the code. My rotes file looks like this: app.config(function($stateProvider, $urlRouterProvider, $locationProvider) { $stateProvider .state(‘dashboard’, { url: ‘/dashboard’, templateUrl : ‘pages/dashboard.html’, controller : ‘DashController’ }) .state(‘dashboard.vendas’, { url: ‘/vendas’, templateUrl : […]