I am very simply trying to use the Angular UI router. I have just two states are the moment and they are crazy simple. Here's a bit of my app:
.config(function($stateProvider, $urlRouterProvider){
$stateProvider
.state('items', {
url: '/items',
templateUrl: 'src/components/Items/list.html',
controller: 'ItemsController'
})
.state('item-details', {
url: '/item-details/:itemId',
templateUrl: 'src/components/Items/details.html',
controller: 'ItemDetailsController'
});
$urlRouterProvider.otherwise('/items');
});
And a bit of my HTML:
<a ui-sref="item-details/{{item.id}}">{{ item.name }}</a>
When I type item-details/194 manually into my browser, things work like a charm. But, when I try to follow the link I've listed above, I get this error:
Error: Could not resolve 'item-details/194' from state 'items' at Object.y.transitionTo
I'm hoping I'm doing something pretty obvious, but this is proving to be trickier than I expected!