question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: angular, tab select method has wrong types

See original GitHub issue

Prequisites

Ionic Framework Version

  • v4.x
  • v5.x
  • v6.x

Current Behavior

After updating to new ionic the 5.8 I can’t select my IonTabs using string object anymore.

https://github.com/ionic-team/ionic-framework/commit/1ed9f07060736d0c951910427fb12b250d7dd9af#commitcomment-56780145

Expected Behavior

Be able to use the select method from IonTabs with string.

Steps to Reproduce

<ion-tabs #appTabs>

  @ViewChild('appTabs') tabsRef: IonTabs;

  changeTab(tabName: string) {
      this.tabsRef.select(tabName);
  }

Code Reproduction URL

No response

Ionic Info

Ionic:

Ionic CLI : 6.12.4 (C:\Users\joao_\AppData\Roaming\npm\node_modules@ionic\cli) Ionic Framework : @ionic/angular 5.6.14 @angular-devkit/build-angular : 0.1100.7 @angular-devkit/schematics : 11.2.14 @angular/cli : 11.2.14 @ionic/angular-toolkit : 3.1.1

Capacitor:

Capacitor CLI : 3.2.0 @capacitor/core : 3.2.0

Utility:

cordova-res : not installed native-run : 1.4.0

System:

NodeJS : v14.15.4 (C:\Program Files\nodejs\node.exe) npm : 6.14.10 OS : Windows 10

Additional Information

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
thomasletalleccommented, Sep 22, 2021

Hi @liamdebeasi

We had the same issue in our application. I can confirm the dev build fixes the issue.

0reactions
ionitron-bot[bot]commented, Oct 22, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

bug: angular, tab select method has wrong types #23952
After updating to new ionic the 5.8 I can't select my IonTabs using string object anymore. 1ed9f07#commitcomment-56780145. Expected Behavior. Be ...
Read more >
Angular Material - Selecting new tab after adding
The issue here is that the tabs array and the actual number of tabs are out of sync. I modified the addTab method...
Read more >
Tabs | Angular Material
Supports string and string array values, same as ngClass . Plain text label for the tab, used when there is no template label....
Read more >
Top 18 Most Common AngularJS Developer Mistakes
However, if you use ui-router , specifying a controller that way is prone to error. For states, controllers should be specified in the...
Read more >
What went wrong? Troubleshooting JavaScript - MDN Web Docs
The error message says "guessSubmit.addeventListener is not a function", which means that the function we're calling is not recognized by the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found