I am building an angularjs app, my app.js looks like this. However, it throws Unknown provider: $routeParams
error. Any idea why?
var angularSite = angular.module('angularSite', [
'ui.router',
'ngRoute',
'siteController',
'siteDirectives'
])
.config(['$routeProvider', '$routeParams',
function($routeProvider,$routeParams) {
$routeProvider.
when('/Projects', {
templateUrl: 'partials/projects.html',
controller: 'ProjectController'
}).
when('/Projects/:projectId', {
template: 'partials/pages/'+$routeParams.projectId+'.html',
controller: 'ProjectDetailController'
}).
otherwise({
redirectTo: '/About'
});
}]);