mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-16 15:40:11 +01:00
Merge a541af26b8 into dc6a442704
This commit is contained in:
commit
589bc934ca
3 changed files with 11 additions and 5 deletions
|
|
@ -187,5 +187,8 @@
|
||||||
"@angular-eslint/schematics:library": {
|
"@angular-eslint/schematics:library": {
|
||||||
"setParserOptionsProject": true
|
"setParserOptionsProject": true
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"cli": {
|
||||||
|
"analytics": "bc1499f9-0bc1-4ae6-ab35-867275a6a90f"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
</nb-card>
|
</nb-card>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-12 col-lg-6 col-xxxl-6">
|
<div *ngIf="secondCard.news.length" class="col-md-12 col-lg-6 col-xxxl-6">
|
||||||
<nb-card>
|
<nb-card>
|
||||||
<nb-card-header>Window Scroll</nb-card-header>
|
<nb-card-header>Window Scroll</nb-card-header>
|
||||||
<nb-list
|
<nb-list
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Component } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { NewsService } from '../news.service';
|
import { NewsService } from '../news.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
|
@ -6,7 +6,7 @@ import { NewsService } from '../news.service';
|
||||||
templateUrl: 'infinite-list.component.html',
|
templateUrl: 'infinite-list.component.html',
|
||||||
styleUrls: ['infinite-list.component.scss'],
|
styleUrls: ['infinite-list.component.scss'],
|
||||||
})
|
})
|
||||||
export class InfiniteListComponent {
|
export class InfiniteListComponent implements OnInit{
|
||||||
|
|
||||||
|
|
||||||
firstCard = {
|
firstCard = {
|
||||||
|
|
@ -24,7 +24,10 @@ export class InfiniteListComponent {
|
||||||
pageSize = 10;
|
pageSize = 10;
|
||||||
|
|
||||||
constructor(private newsService: NewsService) {}
|
constructor(private newsService: NewsService) {}
|
||||||
|
ngOnInit() {
|
||||||
|
this.loadNext(this.firstCard);
|
||||||
|
this.loadNext(this.secondCard);
|
||||||
|
}
|
||||||
loadNext(cardData) {
|
loadNext(cardData) {
|
||||||
if (cardData.loading) { return; }
|
if (cardData.loading) { return; }
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue