-
Notifications
You must be signed in to change notification settings - Fork 156
fix(@schematics/angular): fix import path for generated flat modules #354
Conversation
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. |
59a1188
to
3c53c84
Compare
CLAs look good, thanks! |
Fix for #355 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor change.
expect(files.indexOf('/src/app/app.module.ts')).toBeGreaterThanOrEqual(0); | ||
expect(files.indexOf('/src/app/foo.module.ts')).toBeGreaterThanOrEqual(0); | ||
const moduleContent = getFileContent(tree, '/src/app/app.module.ts'); | ||
expect(moduleContent).toMatch(/import { FooModule } from '.\/foo.module'/); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update regex to this:
/import { FooModule } from '\.\/foo.module'/
This way it checks for a period and not any character.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely.. added and squashed the requested change
3c53c84
to
679a361
Compare
@dkuerner can you rebase please? I'm not sure how the CI error relates to your changes and suspect it will go away on a rebase. |
679a361
to
98182be
Compare
e099560
to
cc12bce
Compare
If the target modulePath and the importModulePath are equal, do not add a path seperator to the resulting module import path.
cc12bce
to
30f3fa4
Compare
Sorry @dkuerner - this got lost when we moved back to the angular/angular-cli repo. If you still think this pull request is relevant, could you please re-base on that repo and open a new PR there? Thanks and sorry for the extra churn. |
If the target modulePath and the importModulePath are equal,
do not add a path seperator to the resulting module import path.