fix(core): deprecate moduleId @Component property #49496
Closed
devversion wants to merge 4 commits intoangular:mainfrom
Closed
fix(core): deprecate moduleId @Component property #49496devversion wants to merge 4 commits intoangular:mainfrom
moduleId @Component property #49496devversion wants to merge 4 commits intoangular:mainfrom
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
approved these changes
Mar 22, 2023
Contributor
jelbourn
left a comment
There was a problem hiding this comment.
LGTM
Reviewed-for: public-api
alxhub
approved these changes
Mar 22, 2023
crisbeto
reviewed
Mar 22, 2023
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
pkozlowski-opensource
approved these changes
Mar 23, 2023
Member
pkozlowski-opensource
left a comment
There was a problem hiding this comment.
LGTM
Reviewed-for: public-api
Contributor
|
This PR was merged into the repository by commit 605c536. |
atscott
pushed a commit
that referenced
this pull request
Mar 24, 2023
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See individual commits