Skip to content
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

Controllers are reloaded, after a previous use of {notify: false} #2409

Closed
dhavyd opened this issue Dec 3, 2015 · 1 comment
Closed

Controllers are reloaded, after a previous use of {notify: false} #2409

dhavyd opened this issue Dec 3, 2015 · 1 comment

Comments

@dhavyd
Copy link

dhavyd commented Dec 3, 2015

UI-Router 0.2.15

This can be related to #1387

I have the following states:

  var appState = {
    name: 'app',
    url: "/:view?from&to&selected&filter",
    views: {
      'header@': {
        controller: 'HeaderCtrl',
        templateUrl: '/headet.html',
      },
      'content@': {
        controller: 'ContentCtrl',
        templateUrl: '/content.html'
      }
    };
  var searchState = {
    name: 'app.search',
    url: "/search?query",
    views: {
      'sidebar@': {
        controller: 'SearchCtrl',
        templateUrl: '/search.html'
      }
    },
 };

If I call

$state.go($state.$current, {view: 'table'}, {notify: false});

it updates the "view" parameter as expected without reloading HeaderCtrl or ContentCtrl. But if I, after that call

$state.go('app.search', {query: 'mykeyword'});

Then both HeaderCtrl and ContentCtrl are reloaded (including the views). I don't use "{notify: false}" in the first call, then the controllers are reloaded in the first call, but not in the second one.

I need to update "view" on "app" state with reloading everything and then be able to call "app.search" without reloading HeaderCtrl and ContentCtrl, why I used "{notify: false}" on the first call. I don't want to reload these controllers at all.

Thanks for any help!

@eddiemonge
Copy link
Contributor

This is a duplicate of a few other issues. notify false is full of problems and is being reworked/removed. Lets say duplicate of #1674

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

No branches or pull requests

2 participants