Crocsx
Crocsx

Reputation: 7609

mat-grid-list not appearing correctly

I am trying to use angular material in my project.

I have the following

<mat-grid-list cols="2" rowHeight="2:1">
        <mat-grid-tile class="item-file-grid" *ngFor="let ind of [1,2,3,4]"></mat-grid-tile>
</mat-grid-list>

in my module I have the following import

  imports: [
    CommonComponentModule,
    SharedModule,
    CommonModule,
    BrowserModule,
    MaterialModule
  ],

But the result is not working, I have no error, but the module is not doing a grid like in the demo. https://material.angular.io/components/grid-list/overview

I have the following, even tho my container is way bigger, looks like a simple div

enter image description here

Upvotes: 0

Views: 3720

Answers (1)

Hardik Patel
Hardik Patel

Reputation: 3949

Did you import MatGridListModule in your angular module?

import {MatGridListModule} from '@angular/material/grid-list';

Upvotes: 3

Related Questions