1
0
mirror of https://github.com/angular/angular-cli.git synced 2025-05-17 11:03:53 +08:00
Alan Agius 0c9d137ff0 fix(@schematics/angular): add standalone option to library library
This commit fixes an issue were libraries could not be created with standalone APIs.

Standalone libraries do not have an an NgModule. When consumed users need to import the needed components, pipes, and directives.

It is also recommended not to avoid grouping exports as this typically indicates bad architecture and may also hinder tree-shaking.

**Don't**
```ts
export const COMPONENTS = [
  FooComponent,
  BarComponent,
]
```

**Do**
```ts
export { FooComponent } from './foo/foo.component';
export { BarComponent } from './bar/bar.component';
```
2023-04-25 15:38:57 +00:00
..