Am ordering the return item by timestamp , but it doesnt work
it return items in order of date posted ,so when new post go to bottom instead of top
this is my factory
.factory("items", function($firebaseArray) {
var itemsRef = new Firebase("https//*****.firebaseio.com/comments");
return itemsRef;
})
this is my controll
.controller('streamCtrl', function($scope, items, $firebaseArray, $rootScope, $ionicModal, ionicToast, $localStorage) {
$scope.comments = $firebaseArray(items.orderByChild("timestamp"));
this is post with the time stamp which post successfull
$scope.comment.timestamp = Firebase.ServerValue.TIMESTAMP;