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

$ionicTabsDelegate.select doesn't work after $ionicHistory.goBack #5856

Closed
roocster opened this issue Mar 16, 2016 · 2 comments
Closed

$ionicTabsDelegate.select doesn't work after $ionicHistory.goBack #5856

roocster opened this issue Mar 16, 2016 · 2 comments

Comments

@roocster
Copy link

Short description of the problem:

After returning to the screen with tabs using $ionicHistory.goBack(), the $ionicTabsDelegate.select() is not working

Steps to reproduce:
http://codepen.io/anon/pen/aNBPKZ?editors=1010

  1. Click "Go to tabs" button
  2. Select "Tab 02" tab
  3. Click "Go to another state" button
  4. Click "Go to state 2" button
  5. Click "Go back (-2)" button
  6. Select "Tab 01" tab nad then Select "Tab 02" tab
  7. Repeat steps 3-5
  8. Try to switch to "Subtab 02" tab - not working

We get the following warning:
Delegate for handle "subtabs" could not find a corresponding element with delegate-handle="subtabs"! select() was not called!
Possible cause: If you are calling select() immediately, and your element with delegate-handle="subtabs" is a child of your controller, then your element may not be compiled yet. Put a $timeout around your call to select() and try again.

Other information:
After calling the select() function, there is a call to instanceMethodCaller() function. When iterating on tab instances for tab instance that matches "subtabs" handle, the function "hasActiveScope" returns false value.

this._instances.forEach(function(instance) {
    if ((!handle || handle == instance.$$delegateHandle) && instance.$$filterFn(instance)) {
        foundInstancesCount++;
        var ret = instance[methodName].apply(instance, args);
        //Only return the value from the first call
        if (foundInstancesCount === 1) {
            returnValue = ret;
        }
    }
})

Ionic Version: 1.2.4

@jgw96
Copy link
Contributor

jgw96 commented Jan 13, 2017

This issue was moved to ionic-team/ionic-v1#164

@jgw96 jgw96 closed this as completed Jan 13, 2017
@ionitron-bot
Copy link

ionitron-bot bot commented Sep 4, 2018

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants