Comments (2)
got the same issue here
![image](https://private-user-images.githubusercontent.com/130648336/347390513-2c18f3d8-b6f8-4706-b96b-5ed9e370522c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE3NTU4ODQsIm5iZiI6MTcyMTc1NTU4NCwicGF0aCI6Ii8xMzA2NDgzMzYvMzQ3MzkwNTEzLTJjMThmM2Q4LWI2ZjgtNDcwNi1iOTZiLTVlZDllMzcwNTIyYy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzIzJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcyM1QxNzI2MjRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0zYTU5NzZlNjI1MGJmZjU2NjRiMmQzYzY1OWYzOGQwMDY4MWFhYjFjMTUyMTlhNDU1ZDVmMzQzY2I0NjI0NzJmJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.fw11hGM65OTZmE2JcOfyS-Y5OKLn7CKilLPlBgTrPIA)
from angular.
solved by adding this in ts
@ContentChildren('horizontalCardCustomContent', { descendants: true, read: ElementRef }) horizontalCardCustomContent!: QueryList<ElementRef>;
@ContentChildren('horizontalCardCustomCta', { descendants: true, read: ElementRef }) horizontalCardCustomCta!: QueryList<ElementRef>;
@ContentChildren('horizontalCardCustomImageContent', { descendants: true, read: ElementRef }) horizontalCardCustomImageContent!: QueryList<ElementRef>;
contentFlags = {
customContent: false,
customCta: false,
customImageContent: false,
};
ngAfterContentInit() {
this.contentFlags.customContent = this.horizontalCardCustomContent.length > 0;
this.contentFlags.customCta = this.horizontalCardCustomCta.length > 0;
this.contentFlags.customImageContent = this.horizontalCardCustomImageContent.length > 0;
}
and use this in html
<ng-container *ngIf="contentFlags.customImageContent">
<hd-base-hc-custom-image-content>
<ng-content select="horizontal-card-custom-image-content"></ng-content>
</hd-base-hc-custom-image-content>
</ng-container>
<ng-container *ngIf="contentFlags.customCta">
<hc-hd-base-hc-custom-cta>
<ng-content select="horizontal-card-custom-cta"></ng-content>
</hc-hd-base-hc-custom-cta>
</ng-container>
<ng-container *ngIf="contentFlags.customContent">
<hc-hd-base-hc-custom-content>
<ng-content select="horizontal-card-custom-content"></ng-content>
</hc-hd-base-hc-custom-content>
</ng-container>
from angular.
Related Issues (20)
- ng-content Projection with e-columns Directives Not Working with our own Angular grid component HOT 3
- Allow to pass a custom cookie parser function to create XSRF_COOKIE_NAME
- Moving projected content into another DOM element is not getting destroyed when they should, causes a memory leaks
- false hydration error NG0502 reported HOT 2
- Max Call Stack error with large template HOT 7
- Dead link HOT 3
- Resolver function with SSR executed twice, on server and on client HOT 9
- Allow for router resolvers to block route matching HOT 1
- Angular Router does not match the path when query parameters are present HOT 2
- Tutorial zip broken HOT 4
- Video tutorial links to code that is incompatible with the text tutorial on the exact same page HOT 1
- Links embedded inside docs sidebar popouts are not clickable HOT 1
- Allow caching HTTP requests when URLs differ between server and client
- "Content projection" guide does not mention fallback content HOT 2
- Forward page error from v17.angular.io to angular.dev/tools/cli/esbuild
- @if < behave differently comparing with other compare operators while formatting in Visual Code HOT 3
- Rename validator `max` to `maxValue` HOT 1
- Extended diagnostics do not run on structural directive attributes
- Cannot read @let declaration before it has been defined HOT 1
- Form groups initialized in FormBuilder can't be initially disabled
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular.