Problem:
If you run ionic generate component <existing page>/someCustomComponent
,
it does not make the appropriate changes in the module file.
Example:
CREATE src/app/existing-Page/some-Custom-Component.component.html (38 bytes)
CREATE src/app/existing-Page/some-Custom-Component.component.spec.ts (755 bytes)
CREATE src/app/existing-Page/some-Custom-Component.component.ts (287 bytes)
CREATE src/app/existing-Page/some-Custom-Component.component.scss (0 bytes)
What is missing above is the UPDATE src/app/app-routing.module.ts
or update the existing-page.module.ts
However, if you do the same with ionic generate page <existing page>/someCustomPage
,
it works as expected and updates the module file.
Example:
CREATE src/app/existing-Page/some-Custom-Page.module.ts (574 bytes)
CREATE src/app/existing-Page/some-Custom-Page.page.html (132 bytes)
CREATE src/app/existing-Page/some-Custom-Page.page.spec.ts (734 bytes)
CREATE src/app/existing-Page/some-Custom-Page.page.ts (283 bytes)
CREATE src/app/existing-Page/some-Custom-Page.page.scss (0 bytes)
UPDATE src/app/app-routing.module.ts (586 bytes)
Versions:
Running @ionic/angular 4.1.0
Is this expected behavior? Thought the generate
should automatically update the parent page module.