mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 00:27:41 +08:00
docs(router): adds some docs for ion-router
This commit is contained in:
@ -11,16 +11,26 @@
|
||||
|
||||
string
|
||||
|
||||
Name of the component to load/select in the navigation outlet (`ion-tabs`, `ion-nav`)
|
||||
when the route matches.
|
||||
|
||||
The value of this property is not always the tagname of the component to load,
|
||||
in ion-tabs it actually refers to the name of the `ion-tab` to select.
|
||||
|
||||
|
||||
#### componentProps
|
||||
|
||||
|
||||
|
||||
Props to pass when the `component` specified in this route load.
|
||||
|
||||
|
||||
#### url
|
||||
|
||||
string
|
||||
|
||||
Relative path that needs to match in order for this route to apply.
|
||||
|
||||
|
||||
## Attributes
|
||||
|
||||
@ -28,21 +38,33 @@ string
|
||||
|
||||
string
|
||||
|
||||
Name of the component to load/select in the navigation outlet (`ion-tabs`, `ion-nav`)
|
||||
when the route matches.
|
||||
|
||||
The value of this property is not always the tagname of the component to load,
|
||||
in ion-tabs it actually refers to the name of the `ion-tab` to select.
|
||||
|
||||
|
||||
#### component-props
|
||||
|
||||
|
||||
|
||||
Props to pass when the `component` specified in this route load.
|
||||
|
||||
|
||||
#### url
|
||||
|
||||
string
|
||||
|
||||
Relative path that needs to match in order for this route to apply.
|
||||
|
||||
|
||||
## Events
|
||||
|
||||
#### ionRouteDataChanged
|
||||
|
||||
Used internaly by `ion-router` to know when this route did change.
|
||||
|
||||
|
||||
|
||||
----------------------------------------------
|
||||
|
||||
@ -6,10 +6,28 @@ import { EventEmitter } from 'ionicons/dist/types/stencil.core';
|
||||
})
|
||||
export class Route {
|
||||
|
||||
/**
|
||||
* Relative path that needs to match in order for this route to apply.
|
||||
*/
|
||||
@Prop() url = '';
|
||||
|
||||
/**
|
||||
* Name of the component to load/select in the navigation outlet (`ion-tabs`, `ion-nav`)
|
||||
* when the route matches.
|
||||
*
|
||||
* The value of this property is not always the tagname of the component to load,
|
||||
* in ion-tabs it actually refers to the name of the `ion-tab` to select.
|
||||
*/
|
||||
@Prop() component: string;
|
||||
|
||||
/**
|
||||
* Props to pass when the `component` specified in this route load.
|
||||
*/
|
||||
@Prop() componentProps: {[key: string]: any};
|
||||
|
||||
/**
|
||||
* Used internaly by `ion-router` to know when this route did change.
|
||||
*/
|
||||
@Event() ionRouteDataChanged: EventEmitter;
|
||||
|
||||
componentDidLoad() {
|
||||
|
||||
Reference in New Issue
Block a user