O'Reilly logo

Angular UI Development with PrimeNG by Oleg Varaksin, Sudheer Jonna

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Listing data with OrderList

The OrderList component is used to sort a collection of items in different directions (up and down). The component requires an array type variable to store its value and ng-template to display content of an array of items. Each item will be accessed inside the ng-template template using a local ng-template variable. When the position of an item changes, the backend array is also updated to store the latest item order.

A basic example of the OrderList component with country information would be written as follows:

<p-orderList [value]="countries"  header="Favourite countries" >  <ng-template let-country pTemplate="item">    <div class="ui-helper-clearfix">      <img src="/assets/data/images/country/        {{country.code.toLowerCase ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required