我正在用angular实现Nativescript应用程序,并想做图像缓存。Nativescript文档只展示了如何使用view,而不是angular。我找到了这个主题:how do i cache images in nativescriptangular但answer看起来不是很有希望,因为1)局部函数2)感觉它没有OnPush策略 综上所述,我认为可观察性应该是可行的ImageSource, fromNativeSource
我试着去理解this.but,这个解决方案是在angular中实现的,我不知道如何在javascript中使用它。Issues changing the background colour of the currently selected item in a ListView - Nativescript/Angular2https://play.nativescript.org/?template=play-js&id