Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ghoul007/angular-content-projection
ngTemplateOutlet vs ngContent
https://github.com/ghoul007/angular-content-projection
Last synced: about 1 month ago
JSON representation
ngTemplateOutlet vs ngContent
- Host: GitHub
- URL: https://github.com/ghoul007/angular-content-projection
- Owner: ghoul007
- Created: 2019-10-03T09:00:01.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T10:20:18.000Z (about 2 years ago)
- Last Synced: 2024-04-24T10:24:13.484Z (9 months ago)
- Language: TypeScript
- Size: 1.77 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 27
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Content projection
Content projection is a way to import HTML content from outside the component and insert that content into the component’s template in a designated spo## The problem ( When using NG-Content )
The problem is that 'nested' components are immediately initialized and not destroyed when removed from DOM.
## Solution ( Using template outlet )
```js
```
[Example with loader](https://stackblitz.com/edit/angular-dscswb)