[英]How to display data in firebase using angularfire collection?
我在URL“ https://wpladv.firebaseio.com/adventure ”中的Firebase中有一些数据,并且我的js文件中包含以下代码:
.factory('dataUpdate', ['angularFireCollection', function(angularFireCollection) {
var dbUrl = 'https://wpladv.firebaseio.com/adventure';
return {
adventures: function(){
var cat = '/adventure';
return angularFireCollection(dbUrl + cat);
}
}
}])
我的HTML中也有以下代码
<ul class="unstyled">
<li ng-repeat="adventure in adventures">
<div class="well">
<h4>{{adventure.name}}</h4>
<h5><em>{{adventure.desc}}</em></h5>
<p>{{adventure.theme}}</p>
<p>{{adventure.like}}%</p>
<p>Taken by {{adventure.used}}</p>
</div>
</li>
</ul>
firebase中的数据使用JSON。 我的问题是如何使用angularfire集合对象在URL中显示数据? 我是angularfire的新手,任何建议将不胜感激。 提前致谢。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.