Allow ng-container to work inside mat-grid-list
Being able to use ng-container inside mat-list-grid, so it would allow to have ngSwitch or *ngFor doing some logic before creating the item.
If you try to add ng-container nothing is rendered.
1 - Create a mat-grid-list
2 - Add ng-container with ngFor or ngSwitch
3 - Add the mat-grid-tile, and nothing is rendered
https://stackblitz.com/edit/angular-material2-issue-8vvb8z
Being able to generate a dashboard dynamically based on the type of component you need to load, and use breakpointObserver to define the number of columns based on the type of the widget.
For example:
widget 1 loads a map
widget 2 loads a random number of charts, where it chart should be a tile
Angular 6.1.2
Angular Material 6.4.5
macOS 10.13.6
Typescript 2.9.2
All Browsers
mat-grid-list is an host element, you shouldn't rely on ng-container for your structural directives and use them directly in mat-grid-list balise tag.
@geromegrignon Yes I understand, but I still think that limiting it to accept only mat-grid-tile as its child, does not allow too much flexibility on a more complex view. And while I could use flex-layout to achieve the responsive the design I need, it would not be as easy to maintain as using the grid.
Please reopen this issue. It is not fixed in @angular/[email protected]
See my Stackblitz link here: https://stackblitz.com/edit/angular-material2-issue-zdxvqh
I try to use ng-container with ng-template because i want to transclude the content instead of having that as a string.
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
Please reopen this issue. It is not fixed in @angular/[email protected]
See my Stackblitz link here: https://stackblitz.com/edit/angular-material2-issue-zdxvqh
I try to use
ng-containerwithng-templatebecause i want to transclude the content instead of having that as a string.