From 9ed2d8ad0caa708066d088413776ddaa6474c9b7 Mon Sep 17 00:00:00 2001 From: jamesgroat Date: Fri, 29 Sep 2017 09:21:17 -0700 Subject: [PATCH 1/3] docs: fix error re: default segment naming The docs incorrectly state how segments get their default names. See commit https://github.com/ionic-team/ionic-app-scripts/commit/5a97ba5b8bf125f741cc46ace7d45ccdbdf7bfac. Add note about name and segment properties needing to be unique. https://github.com/ionic-team/ionic-app-scripts/commit/63c4c7ff1878a2c123de43d6240bfbe2e5fe8077 --- src/navigation/ionic-page.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/navigation/ionic-page.ts b/src/navigation/ionic-page.ts index bc7056da1df..04c3d0fbd10 100644 --- a/src/navigation/ionic-page.ts +++ b/src/navigation/ionic-page.ts @@ -79,7 +79,8 @@ export interface IonicPageMetadata { * * The `@IonicPage` decorator accepts a `DeepLinkMetadataType` object. This object accepts * the following properties: `name`, `segment`, `defaultHistory`, and `priority`. All of them - * are optional but can be used to create complex navigation links. + * are optional but can be used to create complex navigation links. The `name` and `segment` + * values must be unique.. * * * ### Changing Name @@ -108,7 +109,7 @@ export interface IonicPageMetadata { * ### Setting URL Path * * The `segment` property is used to set the URL to the page. If this property isn't provided, the - * `segment` will use the value of `name`. Since components can be loaded anywhere in the app, the + * `segment` will use the value of source file name without the extension (`'my-page.ts'` results in segment name `'my-page'`). Since components can be loaded anywhere in the app, the * `segment` doesn't require a full URL path. When a page becomes the active page, the `segment` is * appended to the URL. * From 13e661b6fe557adf880af207a8377f02054e7eb5 Mon Sep 17 00:00:00 2001 From: jamesgroat Date: Fri, 29 Sep 2017 09:23:44 -0700 Subject: [PATCH 2/3] fix formatting --- src/navigation/ionic-page.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/navigation/ionic-page.ts b/src/navigation/ionic-page.ts index 04c3d0fbd10..852f89769a2 100644 --- a/src/navigation/ionic-page.ts +++ b/src/navigation/ionic-page.ts @@ -109,9 +109,10 @@ export interface IonicPageMetadata { * ### Setting URL Path * * The `segment` property is used to set the URL to the page. If this property isn't provided, the - * `segment` will use the value of source file name without the extension (`'my-page.ts'` results in segment name `'my-page'`). Since components can be loaded anywhere in the app, the - * `segment` doesn't require a full URL path. When a page becomes the active page, the `segment` is - * appended to the URL. + * `segment` will use the value of source file name without the extension (`'my-page.ts'` results + * in segment name `'my-page'`). Since components can be loaded anywhere in the app, the `segment` + * doesn't require a full URL path. When a page becomes the active page, the `segment` is appended + * to the URL. * * The `segment` can be changed to anything and doesn't have to match the `name`. For example, passing * a value for `name` and `segment`: From a0ebfead7d9890238e26294ad241e191566c7d88 Mon Sep 17 00:00:00 2001 From: jamesgroat Date: Fri, 29 Sep 2017 09:24:24 -0700 Subject: [PATCH 3/3] fix punctuation --- src/navigation/ionic-page.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/navigation/ionic-page.ts b/src/navigation/ionic-page.ts index 852f89769a2..448b1a8aa7b 100644 --- a/src/navigation/ionic-page.ts +++ b/src/navigation/ionic-page.ts @@ -80,7 +80,7 @@ export interface IonicPageMetadata { * The `@IonicPage` decorator accepts a `DeepLinkMetadataType` object. This object accepts * the following properties: `name`, `segment`, `defaultHistory`, and `priority`. All of them * are optional but can be used to create complex navigation links. The `name` and `segment` - * values must be unique.. + * values must be unique. * * * ### Changing Name