mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
docs(tabs): add steps to switch tabs from child component (#8829)
* docs(input): fix typo * docs(scroll): add note about required CSS for scrollY * docs(config): add swipeBackEnabled to config properties list * docs(component generator): fix broken link in template comment * docs(directive generator): fix broken link in template comment * docs(modal): add that modal is not reusable * docs (searchbar): update description of debounce * docs(tabs): add steps to switch tabs from child component
This commit is contained in:
committed by
Manu Mtz.-Almeida
parent
d93070a7d5
commit
a49bdf0c8b
@@ -130,6 +130,16 @@ import { ViewController } from '../../navigation/view-controller';
|
||||
* }
|
||||
*```
|
||||
*
|
||||
* You can also switch tabs from a child component by calling `select()` on the
|
||||
* parent view using the `NavController` instance. For example, assuming you have
|
||||
* a `TabsPage` component, you could call the following from any of the child
|
||||
* components to switch to `TabsRoot3`:
|
||||
*
|
||||
*```ts
|
||||
* switchTabs() {
|
||||
* this.navCtrl.parent.switch(2);
|
||||
* }
|
||||
*```
|
||||
* @demo /docs/v2/demos/src/tabs/
|
||||
*
|
||||
* @see {@link /docs/v2/components#tabs Tabs Component Docs}
|
||||
|
||||
Reference in New Issue
Block a user