.state('y.x', {
url: '/x',
templateUrl: "x.html",
controller: ['$scope', '$http', '$stateParams',
function( $scope, $http, $stateParams) {
$scope.submit = function() {
$http.post('/api/', $scope.model).success(function(data) {
$state.go('y');
});
};
}]
})
.state('у', {
url: '/у',
templateUrl: "у.html",
controller: ['$scope', '$http',
function( $scope, $http) {
$http.get('/api/').success(function(data) {
})
}
]
})