Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49184

Erro ion-filter-bar with Firebase

$
0
0

@prtercio wrote:

Hi guys,
I'm trying to filter the data I get from Firebase. This is code in my controller:

  var refProd = new Firebase(URL_SETTINGS.FIREBASE_URL+"data");
        refProd.on('value', function(snapshot) {
            $scope.data = snapshot.val();
        });

  var filterBarInstance;
      $scope.showFilterBar = function () {
        filterBarInstance = $ionicFilterBar.show({
          items: $scope.data,
          update: function (filteredSub) {
            $scope.data = filteredSub;
          }
        });
      };

But when I look I get this error:

Error: [filter:notarray] Expected array but received: {"
-KHQMf2p_Y6YwvqrfOCu":{"name":"name1","city":"city1",".......

Please, any suggestions, I know you not do !!

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49184

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>