Open arunachalam-github opened 4 years ago
Having the same issue here. Need to use ngFor to loop through, and then a ngIf to select the items I want but can't do it because nb-list don't support ng-container or even ng-template.
Tried to hack it with [style.visibility] but that just leaves an empty void.
Currently doing a workaround creating a new list just to get it going. Would be nice if nb-list is updated to work with ng-container so I can do both ngFor and ngIf.
Never mind. Created a pipe to filter out things I don't need and that works.
Some discussion on this here: https://stackoverflow.com/questions/34164413/how-to-apply-filters-to-ngfor
Came across this issue... It's a basic use case to render different items or even custom components within a nb-list For example
<nb-list>
<my-custom-component></my-custom-component>
</nb-list>
My component.html
<nb-list-item> This is custom </nb-list-item>
It won't work, would love to see it working though.
Now that I've seen, nb-list-item
also doesn't project ng-container
or ng-template
. I find this library difficult to use if it doesn't support basic angular directives.
This is annoying, we have to filter the list items from the component's code behind.
Looks like nb-radio-group doesn't support this either
**I'm submitting a bug report
Issue description
Current behavior: nb-list is not supporting any wrapper around it. I’m trying to have more than one structural directive on the same element.
`
<ng-container ngFor="let card of cards">
<nb-list-item ngIf="card.groupId == group.id" cdkDrag id="{{card.id}}">