I am currently working on implementing ui-route to manage the states of my app while focusing on URL navigation.
My goal is to enable users to simply click on a link and be directed to the state associated with the specific URL.
After following an In-Depth Guide, I have structured my code as shown below (accessible via plnkr here):
JS:
angularModule.config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider) {
//$urlRouterProvider.otherwise("/management");
$stateProvider
.state('management', {
url: '/',
template: '<p>:)</p>'
})
.state('management.users', {
url: '/users',
templateUrl: './users.html'
});
}]);
HTML:
<div class="container-fluid" ng-controller="PageController">
<aside class="sidebar col-md-3">
<nav>
<ul>
<li><a href="index.html">Management</a></li>
<li><a href="management/users">Users</a></li>
</ul>
</nav>
</aside>
<section class="content col-md-9" ui-view>
</section>
</div>
Can you help me identify what might be missing in my setup?