Browse Source

Merge pull request #3545 from abpframework/docs/3197

Fixed Mistakes in Content Projection Service Documentation
pull/3548/head
Mehmet Erim 7 years ago
committed by GitHub
parent
commit
f5b59aad80
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      docs/en/UI/Angular/Content-Projection-Service.md

4
docs/en/UI/Angular/Content-Projection-Service.md

@ -49,10 +49,10 @@ const strategy = PROJECTION_STRATEGY.ProjectComponentToContainer(
{ someProp: "SOME_VALUE" }
);
const componentRef = this.ContentProjectionService.projectContent(strategy);
const componentRef = this.contentProjectionService.projectContent(strategy);
```
In this example, the `viewContainerRefOfTarget`, which is a `ViewContainerRef` instance, will be cleared and `SomeComponent` component will placed inside it. Moreover, the given context will be applied, so `someProp` of the component will be set to `SOME_VALUE`.
In this example, the `viewContainerRefOfTarget`, which is a `ViewContainerRef` instance, will be cleared and `SomeComponent` component will be placed inside it. In addition, the given context will be applied and `someProp` of the component will be set to `SOME_VALUE`.
> You should keep the returned `ComponentRef` or `EmbeddedViewRef`, as they are a reference to the projected content and you will need them to destroy it when necessary.

Loading…
Cancel
Save