-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Angular: Add Named Components Migration Guide #8171
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
Merged
arman-boyakhchyan
merged 8 commits into
DevExpress:25_1
from
arman-boyakhchyan:angular-config-components-guide-25-1
Nov 17, 2025
Merged
Changes from 3 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
cc73ab0
Angular: Add Named Components Migration Guide
arman-boyakhchyan c66f1f1
Finalize content
arman-boyakhchyan 0ca054e
Update following feedback
arman-boyakhchyan 6c853c5
Update inline snippets
arman-boyakhchyan ddce78f
Add image
arman-boyakhchyan beb6a3c
Apply suggestions from code review
arman-boyakhchyan aba1c1a
Apply suggestions from code review
arman-boyakhchyan ac4e97a
Update concepts/Common/DevExtreme CLI/30 Migrate to Named Configurati…
arman-boyakhchyan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
63 changes: 63 additions & 0 deletions
63
concepts/Common/DevExtreme CLI/30 Migrate to Named Configuration Components.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| DevExtreme Angular v24.2 introduced named configuration components. These are strictly typed and specific to each UI component. Strict typing allows code completion and hinting systems to suggest only valid configurations and detect invalid usage. | ||
|
|
||
| The following code snippet demonstrates named and generic configuration components: | ||
|
|
||
| <!-- tab: app.component.html --> | ||
| <!-- Named configuration component --> | ||
| <dx-form> | ||
| <dxi-form-item></dxi-form-item> | ||
| </dx-form> | ||
|
|
||
| <!-- Generic configuration component --> | ||
| <dx-form> | ||
| <dxi-item></dxi-item> | ||
| </dx-form> | ||
|
|
||
| [note] | ||
|
|
||
| - We recommend upgrading to named configuration components to improve your development experience. | ||
| - Starting with v25.2, a warning is displayed in the console if you use generic configuration components. | ||
arman-boyakhchyan marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| [/note] | ||
|
|
||
| To upgrade your Angular application to named configuration components, you can use DevExtreme CLI. The `devextreme migrate angular-config-components` command uses our `devextreme-schematics` package to perform the upgrade. DevExtreme CLI installs this package in the NPM cache when you run `migrate`. You can also install the package manually in your project or global `node_modules`: | ||
|
|
||
| // Project install | ||
| npm i devextreme-schematics --save-dev | ||
|
|
||
| // Global install | ||
| npm i -g devextreme-schematics | ||
|
|
||
| To perform the migration to named configuration components, run `devextreme migrate angular-config-components` in your project root: | ||
arman-boyakhchyan marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| // If DevExtreme CLI is installed (in your project or global node_modules) | ||
| devextreme migrate angular-config-components | ||
|
|
||
| // If DevExtreme CLI is not installed | ||
| npx devextreme-cli migrate angular-config-components | ||
arman-boyakhchyan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| You can add the `--dry` argument to preview changes before upgrading: | ||
|
|
||
| // If DevExtreme CLI is installed (in your project or global node_modules) | ||
| devextreme migrate angular-config-components --dry | ||
|
|
||
| // If DevExtreme CLI is not installed | ||
| npx devextreme-cli migrate angular-config-components --dry | ||
|
|
||
| This command can upgrade generic configuration components in both external templates (.html files) and inline templates (defined within `@Component({})` class decorators). To perform inline template migration, DevExtreme CLI requires the TypeScript package. You can install this package in your project folder or in the global `node_modules`: | ||
arman-boyakhchyan marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| // Project install | ||
| npm i typescript --save-dev | ||
|
|
||
| // Global install | ||
| npm i -g typescript | ||
|
|
||
| DevExtreme CLI can also install TypeScript temporarily to perform inline template migration. This saves the package in the NPM cache. | ||
arman-boyakhchyan marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| If your application does not use inline templates, you can specify an empty `--script-include` value ('' or []) to skip inline template migration: | ||
arman-boyakhchyan marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| npm devextreme migrate angular-config-components --script-include='' | ||
| // ===== or ===== | ||
| npx devextreme-cli migrate angular-config-components --script-include='' | ||
|
|
||
| [tags] angular | ||
arman-boyakhchyan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.