.when('/:countryName/:categoryName', {
templateUrl: 'views/about.html'
})$scope.parameters = $routeParams;{"countryName":"Japan","categoryName":"Football"}$scope.parameters = $routeParams.countryName; HI Ocajian,
Ah, I see what your issue is. When your controller is initialized, you are putting in $scope.parameters = $routeParams;. As $routeParams is an object this will be assigned per reference binding. If any of the properties of $routeParams will change, this will get reflected in $scope.parameters
However, on init, $routeParams.countryName will be undefined. (it is not there yet). So, you assign undefined to $scope.parametersCountr. Undefined is a primitive, and will get assigned per value.
That’s why your seemingly impossible ting happens. $routeParams will receive its properties in after the controller gets initialized.
Does that explain it enough for you?
Regards
Sander