In angular 7 when using NgxMasonryModule(ngx-masonry - ver 1.1.2) though the masonry is working it's not coming as per order of data.
html code:
<ngx-masonry class="row" [useImagesLoaded]="true" [updateLayout]="newsArray" [options]="{ itemSelector: '.masonry-item', transitionDuration: '0.8s', horizontalOrder: true, percentPosition: true, columnWidth: '.masonry-item' }">
<ngxMasonryItem class="col-12 col-sm-6 col-md-4 masonry-item" ngFor="let newsitem of newsArray">
<a class="news__link link-target-blank" href="{{ newsitem.news_link }}" ngIf="newsitem.news_link_ext == 'yes'" target="_blank">
<figure class="news__image {{ newsitem.news_category == 'Video' ? 'news__video' : '' }}" *ngIf="newsitem.news_image != ''">
in newsArray data is coming fine as news3, news2, news1 according to ID desc but in view sometimes the data is coming correct but sometimes it's all jumbled. How to solve this ?
In angular 7 when using NgxMasonryModule(ngx-masonry - ver 1.1.2) though the masonry is working it's not coming as per order of data. html code: <ngx-masonry class="row" [useImagesLoaded]="true" [updateLayout]="newsArray" [options]="{ itemSelector: '.masonry-item', transitionDuration: '0.8s', horizontalOrder: true, percentPosition: true, columnWidth: '.masonry-item' }"> <ngxMasonryItem class="col-12 col-sm-6 col-md-4 masonry-item" ngFor="let newsitem of newsArray"> <a class="news__link link-target-blank" href="{{ newsitem.news_link }}" ngIf="newsitem.news_link_ext == 'yes'" target="_blank"> <figure class="news__image {{ newsitem.news_category == 'Video' ? 'news__video' : '' }}" *ngIf="newsitem.news_image != ''">
in newsArray data is coming fine as news3, news2, news1 according to ID desc but in view sometimes the data is coming correct but sometimes it's all jumbled. How to solve this ?