-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
not able to use ng-container within mat-grid-list #12809
Comments
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. |
Fixes tiles that aren't direct descendants of the grid list not being styled. Fixes angular#12809.
Fixes tiles that aren't direct descendants of the grid list not being styled. Fixes #12809.
Fixes tiles that aren't direct descendants of the grid list not being styled. Fixes #12809.
Fixes tiles that aren't direct descendants of the grid list not being styled. Fixes #12809.
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 |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug, feature request, or proposal:
Allow ng-container to work inside mat-grid-list
What is the expected behavior?
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.
What is the current behavior?
If you try to add ng-container nothing is rendered.
What are the steps to reproduce?
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
What is the use-case or motivation for changing an existing behavior?
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
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 6.1.2
Angular Material 6.4.5
macOS 10.13.6
Typescript 2.9.2
All Browsers
The text was updated successfully, but these errors were encountered: