I'm using ui-router in AngularJS like this:
.state
('browse.category', {
url: "/:category",
templateUrl: "views/browseCategory.html",
controller: function($stateParams, $scope) {
$scope.params = $stateParams;
}
})
How can I make the $stateParams
variable global so I can access it in any view / controller?
Right now I can only access the parameters in the nested view.