I'm implementing AngularUI's routing and appear to be missing something about how to configure a default URL. It seems like the below code would default the user to /dashboard/tree but if I refresh the page, the url appends another /dashboard, so I end up with /dashboard/dashboard/dashboard/dashboard/tree.
How can I properly set the default URL without having this appending issue when the user first visits the page?
config(['$urlRouterProvider', '$stateProvider', function($urlRouterProvider, $stateProvider) { $urlRouterProvider.otherwise('/dashboard/tree'); /* URL mappings */ $stateProvider. state('dashboard', { url: '/dashboard', views: { 'page': { templateUrl: '/partials/admin/dashboard.htm' } } }). state('dashboard.tree', { url: '/tree', views: { 'content': { templateUrl: '/partials/admin/tree-overview.htm' } } }); }])
.otherwise({redirectTo: "/dashboard/tree"})