-
Notifications
You must be signed in to change notification settings - Fork 27k
fix(core): deprecate moduleId @Component property
#49496
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
56579d9 to
95146e7
Compare
95146e7 to
02bd72c
Compare
02bd72c to
f6a084a
Compare
f6a084a to
e75e5c1
Compare
e75e5c1 to
741bce1
Compare
moduleId @Component property
|
Deployed aio for cc6dd27 to: https://ng-dev-previews-fw--pr-angular-angular-49496-l0rv7tlm.web.app Note: As new commits are pushed to this pull request, this link is updated after the preview is rebuilt. |
jelbourn
left a comment
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.
LGTM
Reviewed-for: public-api
The `moduleId` directive field does not have any effect as of Ivy. In View Engine it was used for resolving template and styles relative to the component source location- but ultimately this is not needed as the Angular compiler knows the source file location at build time, and at runtime never even consulted `moduleId`. An XHR is always issue using the extact specified URL. For Angular CLI users, relative URLs in JIT are still possible because the CLI has a TS transform that will replace the references with actual Webpack imports. `moduleId` does not seem worth keeping in the future, as it's not used currently, and even if we would consider supporting relative JIT resource URLs through it, it would be deeply coupled to CommonJS `module.id`. DEPRECATED: The `@Directive`/`@Component` `moduleId` property is now deprecated. It did not have any effect for multiple major versions and will be removed in v17.
Removes all `moduleId:` property references in `@Directive` and `@Component`.
Address feedback
be76740 to
cc6dd27
Compare
alxhub
left a comment
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.
Reviewed-for: public-api
pkozlowski-opensource
left a comment
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.
LGTM
Reviewed-for: public-api
|
This PR was merged into the repository by commit 605c536. |
Removes all `moduleId:` property references in `@Directive` and `@Component`. PR Close #49496
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
See individual commits