Question: nHello,

I am trying to use parameters in my router as follows :

my url call in my html file:

```
<a href="#/itemlist/{{hikelist.id}}">Edit</a>

```

And my router : 

```
packApp
    .config(['$routeProvider', '$httpProvider', '$translateProvider', '$stateParams',
        function ($routeProvider, $httpProvider, $translateProvider, $stateParams) {
            $routeProvider
                .when('/itemlist/:listId', {
                    templateUrl: 'views/itemlists.html',
                    controller: 'ItemlistController',
                    resolve:{
                        resolvedHikelist: ['Hikelist', function (Hikelist,$stateParams) {
                            return Itemlist.get({id: $stateParams.listId});
                        }]
                    }
                })
        }]);

```

But when i run my app, I have this error : 

> 
> Error: [$injector:unpr] Unknown provider: $stateParams
> 
> 
> 

Do you know where it can come from?

Thank you.

Answer: 
You have included or using both `ui-router` and angularjs standard $route service which are incompatible as both do the same thing. You would have to choose one of them. 

See documentation on [ui-router](https://github.com/angular-ui/ui-router) to understand how routes are setup if you go the `ui-router` way.

Else look at `$routeProvider` documentation and use `$routeParams` instead of `$stateParams`

Update: Based on the comments, the issue is that `config` method cannot be injected with services but only provider, so you cannot inject `$routeParams` in `.config` method so remove from there.

If you want to inject routeparams use

```
resolvedHikelist: ['Hikelist','$routeParams', function (Hikelist,$routeParams) {
                            return Itemlist.get({id: $routeParams.listId});
                        }]

```
If you use $stateParams in ItemlistController don't forget to inject it to that controller as well.