未满足的对等依赖关系 @ionic-native/core@3.4.4 在安装 angular2-virtual-scroll 时无效
UNMET PEER DEPENDENCY @ionic-native/core@3.4.4 invalid on install angular2-virtual-scroll
我正在开发一个 Ionic 2.3 Web 应用程序并且需要使用虚拟滚动。
但是当我尝试安装 angular2-virtual-scroll 库时,出现了这个错误:
corp-now@ E:\Projetos\Ionic2\CorpNow
+-- UNMET PEER DEPENDENCY @ionic-native/core@3.4.4 invalid
`-- angular2-virtual-scroll@0.1.5
我该如何解决这个问题?
为什么要为虚拟卷轴添加第三方模块?它是 Ionic 2 的内置功能。
Virtual Scroll displays a virtual, "infinite" list. An array of
records is passed to the virtual scroll containing the data to create
templates for. The template created for each record, referred to as a
cell, can consist of items, headers, and footers.
For performance reasons, not every record in the list is rendered at
once; instead a small subset of records (enough to fill the viewport)
are rendered and reused as the user scrolls.
示例:
<ion-list [virtualScroll]="items">
<ion-item *virtualItem="let item">
{{ item }}
</ion-item>
</ion-list>
您可以阅读更多相关信息on the doc here.
Ionic 2/Angular 2 版本似乎有问题。
使用 Ionic 3 解决。
我正在开发一个 Ionic 2.3 Web 应用程序并且需要使用虚拟滚动。
但是当我尝试安装 angular2-virtual-scroll 库时,出现了这个错误:
corp-now@ E:\Projetos\Ionic2\CorpNow
+-- UNMET PEER DEPENDENCY @ionic-native/core@3.4.4 invalid
`-- angular2-virtual-scroll@0.1.5
我该如何解决这个问题?
为什么要为虚拟卷轴添加第三方模块?它是 Ionic 2 的内置功能。
Virtual Scroll displays a virtual, "infinite" list. An array of records is passed to the virtual scroll containing the data to create templates for. The template created for each record, referred to as a cell, can consist of items, headers, and footers.
For performance reasons, not every record in the list is rendered at once; instead a small subset of records (enough to fill the viewport) are rendered and reused as the user scrolls.
示例:
<ion-list [virtualScroll]="items">
<ion-item *virtualItem="let item">
{{ item }}
</ion-item>
</ion-list>
您可以阅读更多相关信息on the doc here.
Ionic 2/Angular 2 版本似乎有问题。
使用 Ionic 3 解决。