how do i create a grid of cards with angular material?

后端 未结 4 1701
有刺的猬
有刺的猬 2021-02-19 06:06

I am trying to create a grid of three cards per row using ng-repeat. I have a normal array of javascript objects attached to the scope. The code below will create a fresh row fo

4条回答
  •  长情又很酷
    2021-02-19 06:37

    To be compling to material/angular, you must use flex attr to md-card. Flex attr will give you a proportional width about its parent.

    user avatar

    {{user}}

    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua

    Save View

    In this example, you will have two cards (40% each) and when the screen resizes to -sm, the cards will be at 80%.

提交回复
热议问题