For instance for this state:
.state('test', {
url: '/test/:id',
templateUrl: 'insertpathhere.html'
})
In your controller you can navigate like this:
$state.go('test', { id: 420 });
Or you can have something like this in your html:
<a ui-sref="test({id:detail.id})">Click me</a>