docs(router): some docs

This commit is contained in:
Manu Mtz.-Almeida
2018-04-26 19:27:54 +02:00
parent 3328314339
commit bf17a01f36
7 changed files with 2128 additions and 2019 deletions

View File

@ -22,7 +22,8 @@ in ion-tabs it actually refers to the name of the `ion-tab` to select.
Props to pass when the `component` specified in this route load.
A key value `{ 'red': true, 'blue': 'white'}` containing props that should be passed
to the defined component when rendered.
#### url
@ -31,6 +32,9 @@ string
Relative path that needs to match in order for this route to apply.
Accepts paths similar to expressjs so that you can define parameters
in the url /foo/:bar where bar would be available in incoming props.
## Attributes
@ -49,7 +53,8 @@ in ion-tabs it actually refers to the name of the `ion-tab` to select.
Props to pass when the `component` specified in this route load.
A key value `{ 'red': true, 'blue': 'white'}` containing props that should be passed
to the defined component when rendered.
#### url
@ -58,6 +63,9 @@ string
Relative path that needs to match in order for this route to apply.
Accepts paths similar to expressjs so that you can define parameters
in the url /foo/:bar where bar would be available in incoming props.
## Events

View File

@ -8,6 +8,9 @@ export class Route {
/**
* Relative path that needs to match in order for this route to apply.
*
* Accepts paths similar to expressjs so that you can define parameters
* in the url /foo/:bar where bar would be available in incoming props.
*/
@Prop() url = '';
@ -21,7 +24,8 @@ export class Route {
@Prop() component!: string;
/**
* Props to pass when the `component` specified in this route load.
* A key value `{ 'red': true, 'blue': 'white'}` containing props that should be passed
* to the defined component when rendered.
*/
@Prop() componentProps?: {[key: string]: any};