Skip to content
This repository has been archived by the owner on May 1, 2020. It is now read-only.

feat(IonicPage): add config option for module filename #1140

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jakiette
Copy link

Short description of what this resolves:

When using IonicPage on a component, the module file name is assumed to be the page's file name with ".module.ts" appended. This conflicts with different naming conventions users might use, such as Angular's "<feature>.<type>.ts" as it will name the module "<feature>.<type>.module.ts". This leads to errors with different naming structures one might use beyond Angular's even.

Changes proposed in this pull request:

  • A moduleName option is added to IonicPage config that will set the module's file name. This allows setting from an automatic "<full page file name>.module.ts" to "<moduleName>.module.ts" as desired.
  • Default behavior if the option is not passed remains the same.

It was mentioned the suffix itself is configurable in the below linked issue, therefore the regular set suffix is used even with the different file base name option to avoid redundancy.

Fixes: #1093

Note: This needs changes to the IonicPage metadata type which needs to be modified in the ionic-angular module.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant