v8.3.12026-11-17
本次更新主要修复了一个安全问题:依赖链中的 minimatch 存在漏洞,已通过升级相关依赖解决。建议所有用户尽快更新,以消除潜在风险。
v8.3.02026-10-28
v1.2.0:安全加固版本。用户输入中的「..」路径片段现在会被拦截,防止路径穿越攻击,避免文件被生成到工作区之外;同时对用户提供的正则表达式做了保护处理,防止恶意正则导致的性能或安全问题。升级后建议检查依赖此功能的自动化流程是否受影响。
v8.2.02026-10-22
这是一次例行维护更新,没有新功能,主要是修复问题、提升稳定性。建议升级。
v8.1.02026-08-19
- VS Code >= 1.125 is now required. The extension may still work in older versions, but they are not tested anymore.
- fix: missing closing tag in material schematic
- update js-yaml to 5.3.0 to fix vulnerability
v8.0.32026-05-09
New Angular 22 @Service decorator
Angular 22 introduces a new @Service() decorator, aimed at replacing most of @Injectable(). The angular-service schematic will now use it when available (it requires Angular >= 22 stable to be installed and detected).
If you prefer to still use @Injectable(), use the new angular-injectable schematic.
Change detection OnPush by default in Angular 22
OnPush change detection is now the default in Angular 22. The extension was already setting OnPush by default from quite some time now. So no change from the user side for this extension, but you will notice things when generating components in Angular >= 22 projects:
- no more changeDetection: ChangeDetectionStrategy.OnPush, as it is already the default
- if you enabled the skipChangeDetectionOnPush option, it will now generate changeDetection: ChangeDetectionStrategy.Eager
Signal forms
FormRoot and FormField have been added to the imports choices (it requires Angular >= 22 stable to be installed and detected).
ngOnInit()
Angular is now zoneless by default, enforcing signals, so ngOnInit() is not required anymore, even in pages. So the angular-page schematic does not include ngOnInit() by default anymore, and the skipNgOnInit option has been removed in favor of ngOnInit, to be consistent with other schematics.
You can enable back ngOnInit in pages in just a few clicks with the configuration helper.
Lazy-loading
First, the routes schematic is fixed when lazy-loading.
Second, previously, both pages and routes were generated with lazy-loading by default (with options to disable it). It was due to historical reasons (the routes schematics did not exist at first).
But while lazy-loading is a good practice, too much lazy-loading becomes a bad one. It must be done either at routes level, or at page level, but probably not at both levels.
So now it is still done at routes level, but not at page level anymore by default (the eagerLoading option is true by default). You can use the configuration helper to switch to page level lazy-loading if your prefer, or disable lazy-loading.
Unit test
The angular-unit-test schematic has been updated to align with current Angular practices, and will now be displayed in projects using vitest.
Selector for pages and dialogs
It was initially considered a good practice to omit the selector for pages and dialogs, because these components are not meant to be called as HTML tags.
But since some versions of Angular, in some cases, not having a unique selector can result in the NG0912 error (which, most of the times, have no actual consequence).
So the extension will continue to not generate a selector by default for pages and dialogs, but introduces a new selectorPrefix for the angular-page and angular-material-dialog schematics. When set, a selector will be generated.
Note that while it is the same option name as for components, directives and pipes, the one for pages and dialogs is not shared with other schematics. It allows to set a different prefix. For example, choose private or page (instead of the default app), and then you get the best of both worlds:
- the NG0912 error is avoided
- but it is explicit they are special components that should not be used as HTML tags
As always, use the configuration helper to configure that in a few clicks.
Also note that if the project uses Angular ESLint, it requires configuration to allow it:
``json
{
"@angular-eslint/component-selector": ["error", {
"type": "element",
"prefix": ["app", "private"],
"style": "kebab-case"
}]
}
`
Angular ARIA
The new Angular ARIA directives have been added to the imports choices (when @angular/aria` is installed and detected).
Formatting
It is just about spaces, but since Angular 20, Prettier is installed and configured in new projects, which comes with some formatting defaults. The extension is now aligned.
Also, formatting settings should be respected in more cases (but note that due to VS Code and TypeScript APIs limitations, it is not possible to be reliable at 100% in this domain; the formatter of the project should do its job after the files generation).
v7.1.02025-12-11
VS Code >= 1.105 is now required (and thus Cursor >= 2.1.32). The extension may still work in older versions, but they are not tested anymore.
v7.0.02025-10-21
New naming conventions
Angular 20 changed the naming conventions for class and file names:
- no more class and file names suffix for components, directives and services:
- ProductCardComponent in product-card.component.ts => ProductCard in product-card.ts
- ProductApiService in product-api.service.ts => ProductApi in product-api.ts
- MissingProductDirective in missing-product.directive.ts => MissingProduct in missing-product.ts
- suffix kept for the other concepts, but file name suffix separator changed from . to -:
- CustomDatePipe in custom-date.pipe.ts => CustomDatePipe in custom-date-pipe.ts
- ProductsPage in products.page.ts => ProductsPage in products-page.ts
- authInterceptor in auth.interceptor.ts => authInterceptor in auth-interceptor.ts
- authGuard in auth.guard.ts => authGuard in auth-guard.ts
- dataResolver in data.resolver.ts => dataResolver in data-resolver.ts
Angular refers to these 2 different naming conventions as:
- the former 2016 style guide, up to Angular 19
- the new 2025 style guide, which is the default since Angular 20
This extension now follows the new naming conventions by default. But you can switch back to the legacy naming conventions in one click with the configuration helper (it must be done in each workspace).
As a reminder, this extension is not developed by the Angular team or affiliated to Google in any way. It is months of unpaid work by a single contributor. So if you do not like this change, I am not responsible for it, and again, you can switch back to the previous behavior.
"Copy settings from angular.json" will take into account type and typeSeparator options (which are automatically added when migrating an Angular 19 project to Angular 20 via ng update).
Pro edition users can additionnaly:
- set custom suffixes
- set a suffix only for the class name but not for the file name
- set a suffix only for the file name but not for the class name
Also for the Pro edition users having custom schematics with suffix, a new fileNameSuffix property is introduced for the schematic.json configuration. For backward compatibility, it defaults to .suffix, but this behavior may be removed in the future. It is strongly recommended to add an explicit fileNameSuffix to all your schematic.json using suffix.
Other changes
- skipClassSuffix option for components, directives and services is removed, as it is now the default behavior
- Angular ESLint suffixes management (both in the configuration helper and the angularEslintComponentSuffix feature for custom schematics) is removed as it does not make sense anymore and as angular-eslint removed the rule from the recommended set in version 20
v6.23.02024-12-28
In the Pro edition, you can now enable automatic classes prefixes, for example to generate MatButtonComponent instead of ButtonComponent (given "mat" is set as the selector prefix). It is useful when doing a library of components.
As usual, use the configuration helper to set this option.
v6.22.02024-12-27
In the Pro edition, you can now disable automatic classes suffixes, for example to generate SomeButton instead of SomeButtonComponent, or SomeApiClient instead of SomeApiClientService.
This option allows to partly align with the upcoming new Angular style guide, being discussed in this RFC.
It has also been the standard in some design systems libraries since always, like Angular Material itself (it is MatButton, not MatButtonComponent).
As usual, use the configuration helper to set this option.
v6.21.02024-12-27
Add the following imports in the Pro edition:
- AG Grid (module and standalone)
- AG Charts (module and standalone)