12

I've got these blocks of codes

<div fxLayout="row" fxLayoutGap="1em" fxLayout.lt-md="column" fxLayoutWrap>
    <div *ngFor="let post of posts; let i=index" >
         <div *ngIf = "i%3===0" fxFlex="90%" fxFlex.lt-md="100%">
             <!--Some code-->
         </div>
         <div *ngIf = "!(i%3===0)" fxFlex="40%" fxFlex.lt-md="100%">
             <!--Some other code-->
         </div>
    </div>
</div>

I want the stuff to be on the same row when I use fxFlex="40%" However, they appear on different rows

georgeawg
  • 48,608
  • 13
  • 72
  • 95
Yiyue Wang
  • 133
  • 1
  • 8

3 Answers3

34

https://github.com/angular/flex-layout/blob/cb0beab46507aa50c513aca8bb6ef632c397035c/CHANGELOG.md#breaking-changes

fxLayoutWrap has been removed. You can use fxLayout options.

<div  fxLayout="row wrap"> ... </div>
cihangir zengin
  • 468
  • 1
  • 6
  • 11
2

flex-layout 6.0.0-beta.16, since fxLayoutWrap directive has been deprecated in this version

<div fxLayout="column" fxLayoutAlign=" none">
  <div fxFlex="100" fxLayout="row wrap" fxLayoutAlign="space-around stretch" fxLayout.xs="column">
    <div *ngFor="let item of items | async" fxFlex.xs="100" fxFlex.sm="50" fxFlex.md="33" fxFlex.lg="33" fxFlex.xl="33">
     {{item}}
    </div>
  </div>
</div>
Uliana Pavelko
  • 2,824
  • 28
  • 32
1

fxLayoutWrap: * [fxLayoutWrap] was deprecated in earlier betas. fxLayoutWrap has now been removed. Developers should use fxLayout options.

Before

<div  fxLayout="row" fxLayoutWrap="wrap"> ... </div>

current

<div  fxLayout="row wrap"> ... </div>