My app is working correctly, but AS SOON AS I add $stateParams in the controller I'm get this error:
angular.js:14791 Error: [$injector:unpr] Unknown provider: $stateParamsProvider <- $stateParams <- ClienteViniCtrl
This is from: app.js
.when('/clienti/:id_cliente', {
templateUrl: 'views/cliente-vini.html',
controller: 'ClienteViniCtrl'
})
This is from: controller.js
.controller('ClienteViniCtrl', function($scope, $stateParams, Vini){
Vini.getWines($stateParams.id_cliente).then(function (result) {
$scope.vini = result;
})
What's the problem?
Do you have added angular-ui-router.js at your project?