Skip to content

Commit

Permalink
docs: mention entryComponents is no longer necessary (#21972)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexElin authored Feb 26, 2021
1 parent 4c1948b commit ae299c2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cdk/portal/portal.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ A component can use `@ViewChild` or `@ViewChildren` to get a reference to a

##### `ComponentPortal`
Used to create a portal from a component type. When a component is dynamically created using
portals, it must be included in the `entryComponents` of its `NgModule`.
portals, it must be included in the `entryComponents` of its `NgModule`if your project uses ViewEngine. Projects
using Angular Ivy don't need `entryComponents`.

Usage:
```ts
Expand Down
2 changes: 2 additions & 0 deletions src/material/bottom-sheet/bottom-sheet.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ export class HobbitSheet {
```

### Configuring bottom sheet content via `entryComponents`
**You only need to specify `entryComponents` if your project uses ViewEngine. Projects
using Angular Ivy don't need `entryComponents`.**

Similarly to `MatDialog`, `MatBottomSheet` instantiates components at run-time. In order for it to
work, the Angular compiler needs extra information to create the necessary `ComponentFactory` for
Expand Down
2 changes: 2 additions & 0 deletions src/material/dialog/dialog.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ export class YourDialog {
```

### Configuring dialog content via `entryComponents`
**You only need to specify `entryComponents` if your project uses ViewEngine. Projects
using Angular Ivy don't need `entryComponents`.**

Because `MatDialog` instantiates components at run-time, the Angular compiler needs extra
information to create the necessary `ComponentFactory` for your dialog content component.
Expand Down

0 comments on commit ae299c2

Please sign in to comment.