Как настроить PAMATER PARAMATER в угловой и доступе в контроллере

$stateProvider.state('transactions', {
    url: '/transactions',
    templateUrl: url,
    menu: 'Transactions'
});

$stateProvider.state('audit', {
    url: '/transactions/{id}/audit',
    templateUrl: 'url',
});

----------------------

var app = angular.module('myApp', []);
app.controller('auditCtrl', function($scope, $stateParams) {
    $scope.transactionId = $stateParams.id;
});
    
----------------------

app.controller('transactionsCtrl', function($scope, $state) {
    $scope.redirectToAudit = function () {
        $state.go('audit', {
            id: $scope.transactionId;
        });
    }
});
SAMER SAEID