mat-grid-list does not render properly
mat-grid-list does not render properly
I have just started using Angular Material with Angular v6. When I try to display the value of a public field in my component, it is not rendered on my web page. However, if I verify that the element exists using the Chrome DevTools, I can see that a value was generated, but the web page does not display it.
<mat-card>
<mat-card-title>Basic grid list getLabel(22, 'Members')</mat-card-title> <!-- This shows properly -->
<mat-card-content class="demo-basic-list">
<mat-grid-list cols="4" [rowHeight]="123">
<mat-grid-tile> getLabel(22, 'Members') </mat-grid-tile> <!-- This does NOT show properly -->
<mat-grid-tile> Two </mat-grid-tile>
<mat-grid-tile> Three </mat-grid-tile>
<mat-grid-tile> Four </mat-grid-tile>
</mat-grid-list>
</mat-card-content>
`
getLabel
1 Answer
1
I just tested this out (replaced the methods with static value) and it worked fine for me.
Could you try the following?
One of these should troubleshoot your way to success.
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Any errors in the console? Could you show your
getLabel
code?– Edric
Aug 28 at 6:57