korhan-Ö
10/3/2016 - 12:23 PM

#Routing Operations

<a href="#addCtl"><i class="fa fa-table fa-fw"></i> Tables</a>
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.