$state.go(to, [toParams], [options]);
to - required string (state name, use ^, . for relative paths )
toParams - optional parameter object
options (optional object )
- location ('replace/true/false' default true)
- inherit // true (default)
- relative // $state.current
- notify // true (if false stateChangeStart & stateChangeSuccess not notified)
- reload // false ( if true force reload of state even parameter not changed )
Demo
$state.go("photos.detail")
// now current state is "photos.detail"
$state.go("^") // goes to state "photos"
$state.go("^.list") // goes to sibling state ("photos.list")
$state.("^.detail.comment") // goes to "photos.detail.comment"