DEV Community

Discussion on: A simple but customizable accordion component in Angular

Collapse
 
dorkforce profile image
DorkForce

Thank you for the ideas put forth here; using a portion of the pattern you show here, I was able to enable proper content projection in the accordion I'm trying to create. (I can't use the full functionality here because I'm wrapping a vanilla javascript implementation inside an Angular component).

Anyway, what I wound up with works fine under the right circumstances, as I built it in a codesandbox. However, pulling the project locally and using different settings (I'm presuming the difference is a newer version of typescript), I'm getting Type 'TemplateRef<any> | undefined' is not assignable to type 'TemplateRef<any> | null'.

I've been doing a lot of research on this but am still stumped. I'll keep looking, certainly, but have you come across this in your implementation?