ListView
The ListView UI element is much like the <li> we have in the DOM world. This element is used to display the data in list format. In our web application, we used the ngFor directive, which will iterate through an array and display each element.
In the case of NativeScript, we have the ListView control, which has a property, items, which takes an array of objects that we want to be displayed. Inside ListView, we have a child control, ng-template, which is used to display each row of an object.
The ng-template has a property, let-item, which represents a single item in an array. Using this item property, we are able to access the object and display the required information.
In our case, we have a boards array that is bound to the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access