<a href="#addCtl"><i class="fa fa-table fa-fw"></i> Tables</a>
<ng-view></ng-view>
app.config(function($routeProvider){
$routeProvider.when('/test', {
controller: 'myCtrl',
templateUrl: 'pages/newtable.html'
})
.when('/contact/:id', {
controller: 'contactCtl',
templateUrl: 'pages/newtable.html'
})
.otherwise({
redirectTo: '/'
});
});
var scotchApp = angular.module('scotchApp', ['ngRoute']); -!!!!
app.controller('contactCtl', function ($scope, $routeParams) {
console.log($routeParams.id);
});
bower install angular-route
ardından
angular-route js import edilir.