Are you looking for something like this?
var app = angular.module('app', ['ngRoute']);
app.config(function($routeProvider) {
$routeProvider
.when('/', {
templateUrl : 'home.html',
controller : 'mainController'
})
.when('/about', {
templateUrl : 'about.html',
controller : 'aboutController'
})
.when('/contact/:id', {
templateUrl : 'contact.html',
controller : 'contactController'
});
});
app.controller('mainController', function($scope) {
});
app.controller('aboutController', function($scope) {
});
app.controller('contactController', ['$scope', '$routeParams',
function ($scope, $routeParams) {
//Obtenés un id desde la URL
var currentId = $routeParams.id;
}]);
From the html, you can navigate like this:
<ul class="nav navbar-nav navbar-right">
<li><a href="#"> Home</a></li>
<li><a href="#about">About</a></li>
<!-- En este link podés pasar el id que necesites -->
<li><a href="#contact/1">Contact</a></li>
</ul>
I hope it serves you.
Greetings