var app = angular.module( "Demo", [ "ngRoute" ] );
app.config( function( $routeProvider ) { // Define routes for the application.$routeProvider .when(/calendar/:month/:day/:year,{ templateUrl:'calendar.html",
controller:'CalendarCtrl"
})
});
Now Controller
app.controller("CalendarCtrl",function($scope,$routeParams) { $scope.model = { message: "date : +$routeParams.month } });
hit the url:- http://localhost:8090/#/calendar/12/26/2015
0 comments: