How to pass params with state.go?

Hello so i’ve got some state that is defined:
.state(‘esbuilder’,{
url:’/esbuilder/:esId’,
views:{
‘mainContent’:{
templateUrl:‘templates/esbuilder.html’,
controller:‘esbuilderCtrl’
}
}
})

and i call it in this way i don’t know if this is good way to call it.
$state.go(‘esbuilder’,‘esId:123’);

any one can tell me how to do it proper way?

Do it like this:

var params = {
    esId: 123
};

$state.go('esbuilder', params);
1 Like

Thank you sir ! It’s working now:)