July 2017
Intermediate to advanced
384 pages
8h 23m
English
Large-scale applications always need best practices to improve the page loading time. It is not advisable to wait for the landing page to display until all contents in the page have been fully loaded. PrimeNG provided a defer directive which postpones the content loading until the component appears in the view port. The content will be lazily loaded when it becomes visible by the page scroll.
The pDefer directive is applied to a container element and the content needs to be wrapped with ng-template directive as follows:
<div pDefer (onLoad)="loadData()"> <ng-template> deferred content </ng-template></div>
The defer directive is very helpful to lazily load huge datasets when you use data iteration ...
Read now
Unlock full access