Is it possible to use if () without matching it with any controller or template?
Here's how I set up my routes:
app.config(function($routeProvider, $locationProvider) {
$locationProvider.html5Mode(true);
$routeProvider
.when('/presentations/:id', {});
});
I need to use routeParams in my controller:
app.controller('PresentationController', function($scope, $routeParams) {
console.log($routeParams);
});
This does not work. I do not need ngView, but I added it if necessary. My controller is already loaded with the ng-controller directive.
source
share