Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Difference between $state.transitionTo() and $state.go() using angular-ui-router in angular js?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 3.17k
    Comment on it

    $state.go(to [, toParams] [, options])
    It returns Promise which represents the state of transition. It is the convenience method for transitioning to a new state.
    $state.go calls $state.transitionTo internally but automatically sets options to { location: true, inherit: true, relative: $state.$current, notify: true }. This allows us to easily use an absolute or relative to path and specify only the parameters we'd like to update (while knowing unspecified parameters inherit from the current state).


    $state.transitionTo(to, toParams [, options])
    It returns a Promise which represents the state of the transition. This is low-level method for transitioning to a new state.
    $state.go() uses transitionTo internally. $state.go() is recommended in most situations.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: