@strenev wrote:
Hello everyone, I have the following state:
.state('app.category', { url: '/categories/:categoryId', views: { 'menuContent': { templateUrl: 'templates/category.html', controller: 'CategoryCtrl' } }, resolve: { category: function ($stateParams, TestCategoriesService) { return TestCategoriesService.getCategory($stateParams.categoryId); }, tests: function (category, TestService) { return TestService.getTestsByCategory(category.id); } } })
controller:
.controller('CategoryCtrl', function ($scope, category, tests) { $scope.category = category; $scope.tests = tests; })
and access it via ui-sref:
<a ui-sref="app.category({categoryId: categories[i].$id })">
Everything is working, despite the fact that ui-sref is not firing on my first click, but only on the second one. When I remove one of the resolves in the state, the problem is gone.
I would appreciate your help on this one!
Posts: 1
Participants: 1