I want to take the last value in this url: http://localhost:60954/Home/Index/3
I made this angular app but the object is always undefined
var app = angular.module('myApp', ['ngRoute']);
app.controller('myController', function ($scope, $routeParams) {
console.log("in ctrlr");
console.log("parameter");
console.log($routeParams);
//this always doesn't work. Should I define `id` somewhere?
console.log($routeParams.id);