In my code, I have implemented the following controller:
app.controller('ObjectBoardCtrl', ['$scope' , '$rootScope' , '$routeParams' ,
function($scope , $rootScope, $routeParams) {
$scope.selectedObjectId = $routeParams.id;
}]);
Along with this route configuration:
app.config(['$routeProvider',
function($routeProvider, $routeParams) {
$routeProvider.when('/object/:id', {
controller: 'ObjectBoardCtrl'
});
}]);
Despite my efforts, the $routeParams object remains null. I am attempting to navigate to different pages using #/object/4334 and have links on the page for various IDs, yet it continues to not update the $routeParams object. I should mention that ngRoute is properly injected and no errors are appearing in the console. What could be missing here? (I have followed numerous tutorials but still can't resolve it).
Thank you!