【发布时间】:2014-11-14 05:36:44
【问题描述】:
是否可以仅使用 angularjs 而没有 Ionic 使用 collection-repeat 指令? 该指令可在https://github.com/driftyco/ionic/blob/master/js/angular/directive/collectionRepeat.js 获得。
谢谢!
【问题讨论】:
是否可以仅使用 angularjs 而没有 Ionic 使用 collection-repeat 指令? 该指令可在https://github.com/driftyco/ionic/blob/master/js/angular/directive/collectionRepeat.js 获得。
谢谢!
【问题讨论】:
是的。但不是在 10 秒内 :)
首先,将指令文件包含到您的项目中,然后转换它(L135):
IonicModule
.directive('collectionRepeat', ...
进入这个:
angular.module('yourModuleName')
.directive('collectionRepeat', ...
然后,把collectionRepeat的两个离子依赖也复制过来,分别是$collectionRepeatManager和$collectionDataSource,重复同样的修改。
你应该完成了。
【讨论】: