Is my $stateProvider:
$stateProvider
.state('home', {
url : '/',
templateUrl : '/admindesktop/templates/main/',
controller : 'AdminDesktopMainController'
}).state('company', {
url : '/company',
templateUrl : '/admindesktop/templates/grid/',
controller : 'CompanyGridController'
}).state('company.detail', {
url : '/{id:\d+}', //id is
templateUrl : '/admindesktop/templates/company/detail/',
controller : 'CompanyDetailController'
});
It's work for 'company' state (I use ui-sref), but this code not work (called from 'company' state):
$state.go('.detail', {
id: $scope.selectedItem.id //selectedItem and id is defined
});
I read official docs and answers from StackOverflow, but I don't found solution. I can't use ui-sref, I use ui-grid, and new state opened after select one row from table for editing.
What i do wrong?