by themounthead | v1.0.1
NativeScript + Angular Infinite List UI Control
npm i --save nativescript-ngx-ilist


A Nativescript Angular UI Control that simulates the List View with added benefits


The existing NativeScript ListView control works great when you define the ListItem Template and associate it to an Angular Component.

But what if you wish to have the benefits of the ListView and couple with Angular's *ngFor loop and not compromise on the performance. That's where this control helps.


The IListView control essentially takes a collection of items and loads only a specifed limit from the list; and its loads the item only when it appears in the device view port.

For instance, consider a collection of 1000 items. If you were to load all of them at once, by instantiating them in an Angular ngFor loop, it would be terribly slow. The IListView control takes the list by renders the items incrementally, as you scroll; thereby ensuring performance and a better user experience.


npm install nativescript-ngx-ilist --save

Import the module into your app-module

import { IListViewModule } from 'ngx-partials';

Getting Started

Similar to the ListView, you need to define the ListItem template, as shown below.

<ng-template #templateRef let-item="item" let-index="index">
<!-- You content goes here -->
<!-- Use this as an item separator -->
<!-- The wireframe/skeleton placeholder before content load -->
  • The IListContent is where you would insert your item content, possibly an Angular Component
  • The IListDivider is simply a spacer tag for the items, like a horizontal line
  • The IListPlaceholder is the skeleton for your item before it gets instantiated


The IListView accepts limit as an argument which is default to 30.

It emits a value with the eofItems emitter when the list has reaches the end, for async loading more data to the list.


The IListService can be used to add more items to the list with the method addItems()


Provided in the demo app