Skip to content

$state.go with notify: false option error #2457

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
k-one-o-two opened this issue Jan 13, 2016 · 4 comments
Closed

$state.go with notify: false option error #2457

k-one-o-two opened this issue Jan 13, 2016 · 4 comments

Comments

@k-one-o-two
Copy link

I've got a controller ListCtrl and there is something like
$state.go($state.current.name, {page: $scope.currentPage}, {reload: false, notify: false}); (used for the pagination).
The problem is that ListCtrl controller is being called after changing the state to another (i.e. not $state.current).

Changing notify to true fixes an issue, but destroys my pagination logic.

I've found a temporary solution: set some var on $stateChangeStart to true and to false on $stateChangeSuccess, then use in a controller like $rootScope.stateChanging || init();. It works but seems strange to me.

Is there something I'm doing wrong or it's a bug?

@j1nX1988
Copy link

+1

1 similar comment
@dougarp
Copy link

dougarp commented Jan 19, 2016

+1

@christopherthielen
Copy link
Contributor

notify: false has so many side effects that it is deprecated. We're replacing the functionality with something called dynamic parameters for final 1.0 release.

I apologize, but we're not going to be addressing any notify: false issues in 0.2.x

To be clear, notify: false only claims to do one thing: suppresses the $stateChange* events. The rest is "up to you". I highly recommend avoiding it.

@Etheryte
Copy link

See #1758

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants