我试图把角材料虚拟重复内角组件。 但是,当我加载时,我收到一个空的内容。不知道,代码有什么问题? 我已经创建了一个plunker来测试这个。如何在角度组件中使用角度材质虚拟中继器?
我从角材料sample使用
self.dynamicItems = new DynamicItems();
代替 this.dynamicItems = new DynamicItems();
。
我试图把角材料虚拟重复内角组件。 但是,当我加载时,我收到一个空的内容。不知道,代码有什么问题? 我已经创建了一个plunker来测试这个。如何在角度组件中使用角度材质虚拟中继器?
我从角材料sample使用
self.dynamicItems = new DynamicItems();
代替 this.dynamicItems = new DynamicItems();
。
根据角度材料文档,虚拟重复需要预先定义的高度。 md-virtual-repeat does not work without predefined height
检查您的Plunkr上的控制台。您没有在代码中的任何位置定义taskFactory
。
angular.js:13920 Error: [$injector:unpr] Unknown provider: taskFactoryProvider <- taskFactory
http://errors.angularjs.org/1.5.8/$injector/unpr?p0=taskFactoryProvider%20%3C-%20taskFactory
at angular.js:68
at angular.js:4511
at Object.getService [as get] (angular.js:4664)
at angular.js:4516
at getService (angular.js:4664)
at injectionArgs (angular.js:4688)
at Object.invoke (angular.js:4710)
at $controllerInit (angular.js:10354)
at nodeLinkFn (angular.js:9263)
at angular.js:9673
对不起,你现在可以试试吗? – softsara