In the below mentioned angular code I am trying to use Angular js routing feature.
Below is the partial code related to routing
...........
...
TicketApp.config(function ($routeProvider) {
$routeProvider
// EXPECTING THIS ROUTE TO BE EXECUTED
.when('/EditTicket/:idx', {
templateUrl: '../Ticket/EditTicket/',
controller: 'EditTicketCtrl'
})
.otherwise({
templateUrl: '../Account/AllUsers',
controller: 'AllUsersCtrl'
});
.......
....
When user clicks a hyper link below function gets called
$scope.Edit = function (idx) {
$location.path('/EditTicket'/idx);
};
When the above function gets executed instead of .when('/EditTicket/:idx'.. , the
otherwise part is getting executed.
Please let me know what needs to be changed so that the .when('/EditTicket/:idx' gets executed.