Search code examples
angularnativescript-angular

Error In nativescript-pager after update nativescript-cli with 6.0?


Error is:-

ERROR TypeError: Could not load view for: Pager.TypeError: Cannot read property 'PagerAdapter' of undefined

ERROR TypeError: TNSViewPager is not a constructor

Sample Code:-

 <Pager row="0" [items]="itemList" [selectedIndex]="selectedIndexValue" cache="false" disableAnimation="true" #pager (selectedIndexChange)="onIndexChanged($event)">
                <ng-template let-i="index" let-itemS="item">
                    <GridLayout rows="*">
                        <Image class="view-animation" row="0" [src]="itemS.path1">
                        </Image>
                        <Image class="view-animation" row="0" [src]="itemS.path2"></Image>
                        <Image class="view-animation" row="0" [src]="itemS.path3"></Image>
                    </GridLayout>
                </ng-template>
            </Pager>

Solution

  • Finally I am find the solution for this question in nativescript cli 6.0.

    1. Android Q
    2. Install nativescript-pager latest plugin.

    Example available on here:- https://github.com/triniwiz/nativescript-pager