15 Commits

Author SHA1 Message Date
Charles Lyding
23fc8e1e17 fix(@schematics/angular): generate components without a .component extension/type
To align with the updated style guide, Angular v20 will generate components
without a `.component` file extension type for all component related
files by default. Projects will automatically use this naming convention.
Projects can however opt-out by setting the `type` option to `Component`
for the component schematic. This can be done as a default in the `angular.json`
or directly on the commandline via `--type=Component` when executing `ng generate`.
As an example, `app.component.css` will now be named `app.css`. Additionally,
the TypeScript class name will be `App` instead of the previous `AppComponent`.
2025-03-14 11:27:43 -07:00
Charles Lyding
dc2f65999a fix(@schematics/angular): generate component templates with a .ng.html file extension
To align with the updated style guide, Angular v20 will generate
component templates with a `.ng.html` file extension instead of
the previous `.html` by default. Projects will automatically
use this new template extension. Projects can however opt-out of
component generation using `.ng.html` by setting the `ngHtml`
option to false for the component schematic. This can be done as
a default in the `angular.json` or directly on the commandline
via `--no-ng-html` when executing `ng generate`.
2025-03-10 09:43:21 +01:00
cexbrayat
8ce57fea5f refactor(@schematics/angular): spacing fixes after experimental zoneless introduction 2024-10-17 14:16:15 +00:00
Jan Martin
fcf7443d62 fix(@schematics/angular): explicitly set standalone:false 2024-10-16 07:56:23 -07:00
Alan Agius
3db1d81397 refactor(@schematics/angular): minor formatting fixes
Some minor formatting fixes.
2024-10-15 19:42:39 +02:00
aparziale
755f3a07f5 feat(@schematics/angular): add option to setup new workspace or application as zoneless mode 2024-10-15 09:28:18 -07:00
Atchyut Pulavarthi
e3b8b780be fix(@schematics/angular): update schematics to use RouterModule when --routing flag is present
update schematics to use RouterModule instead of RouterTestingModule when generating a new project with the --routing flag

Fixes #27691
2024-06-17 12:39:18 +02:00
Pawel Kozlowski
508d97da76 feat(@schematics/angular): use ngZoneEventCoalescing option by default (module bootstrap)
This commit enables ngZoneEventCoalescing by default for NgModule-based applications.
2024-03-29 07:13:56 -07:00
Matthieu Riegler
3c66ba78b4 refactor(@angular-devkit/schematics): use self-closing tag for router-outlet
Let's make the component as simple a possible.
2023-11-20 08:06:08 -05:00
cexbrayat
47700e3c50 fix(@schematics/angular): use styleUrl
The `ng g c` schematic is already using `styleUrl`, but `app.component.ts` was still using `styleUrls`.
2023-11-08 18:57:40 +01:00
Doug Parker
42934bcffe feat(@schematics/angular): update ng new generated application 2023-11-06 15:53:53 -08:00
Charles Lyding
0c20cc4dc5 fix(@angular-devkit/build-angular): re-add TestBed compileComponents in schematics to support defer block testing
The defer block support introduces a new asynchronous form of the set class metadata Angular function. This form
is needed to allow for providing metadata for dynamically imported deferred components. The asynchronous compileComponents
call within TestBed is now used to initialize this metadata during unit tests. Unit tests that contain defer blocks
must use this call prior to executing a test to allow templates containing defer to properly render. Existing tests that
do not use the new defer block do not require modification unless the defer block is introduced into components used in
the unit test.
2023-10-04 09:50:20 -04:00
cexbrayat
202e9a50f6 fix(@schematics/angular): remove compileComponents from component test schematic
`compileComponents` is not necessary when using the CLI (as the templates are inlined) and just adds boilerplate code. So we can remove it from the test schematic and make it independent from `async/await` (only place we would have it in the CLI generated code, and in most Angular apps).
2023-03-24 18:30:26 +00:00
Alan Agius
8917d6d249 refactor(@schematics/angular): simplify application schematic
This commit simplifies the application schematic
2023-03-22 18:24:16 +00:00
Mike Brocchi
a832c20282 feat(@schematics/angular): Implement a standalone flag for new applications 2023-03-21 17:21:40 +00:00