Ionic-framework: Animation option to $state.go

Created on 15 Dec 2014  路  8Comments  路  Source: ionic-team/ionic-framework

How can I provide nav-transition and nav-direction in $state.go()

$state.go('myState', {
    navTransition:'android',
   'navDirection':'forward'
});

Most helpful comment

Try this:

$ionicViewSwitcher.nextDirection('forward'); // 'forward', 'back', etc.
$state.go('myState');

All 8 comments

Is it necessary to use $state.go or could you perhaps use ui-sref:

<div ui-sref='myState' nav-direction="forward" nav-transition='android'>Some element</div>

@drewrygh No I need to do this dynamically. Can you ask @adamdbradley if there is some option to do this?

And also can you reply back to this? https://github.com/driftyco/ionic/issues/2613

+1

Try this:

$ionicViewSwitcher.nextDirection('forward'); // 'forward', 'back', etc.
$state.go('myState');

ui-router does not allow options like this.

it`s work @mpostma

+1 @mpostma

By the way, isn't there a way to specify "up" or "down" to nextDirection() ?

+1 @ledfusion

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wonderdogone picture wonderdogone  路  121Comments

pavimus picture pavimus  路  90Comments

infinnie picture infinnie  路  76Comments

dylanvdmerwe picture dylanvdmerwe  路  109Comments

Sturgelose picture Sturgelose  路  83Comments