The first thing you’ll do is to make sure you have node.js installed. If you’ve previously installed it, check if it’s latest version, compare node --version with.

How to upgrade Node.js on Mac OS X

If you already have Node.js installed on your Mac the simplest way to upgrade Node.js from the Terminal is to use the n version manager:

$ npm install -g n
$ npm cache clean -f

Simply execute n <version> to install a version of node. If has already been installed (via n), n will activate that version.

$ sudo n stable
$ npm update -g

Retrieve the specific record

import { ReplaySubject } from 'rxjs/ReplaySubject';

const userSubject = new ReplaySubject(1);

const userQuery$ = af.database.list('/users', {query: {
  orderByChild: 'uid',
  equalTo: userSubject

userQuery$.subscribe(users => console.log(users)); //=> [{name: 'Jim' ... }]

// submit a query using user id'');

Alternatively, if your users are required to sign in, and you store them using an auth id:

// Firebase
  users: {
    [authentication id]: {
      name: 'Jim',
      meta: {...}
  .subscribe(user => console.log(user)); //=> {name: 'Jim' ... }


Index your data

console show me warning:

FIREBASE WARNING: Using an unspecified index. Consider adding ".indexOn": "user" at /textItems to your security rules for better performance

Display posts in descending posted order

Unfortunately, Firebase does not have a facility to sort in reverse order. You will have to query and get elements in ascending order and then reverse the list. Or another option would be to, as you receive elements, to push them at the beginning of some list rather then the end. Anyways, you get the point — you have to do this yourself somehow.



Remove a node

var ref = firebase.database().ref('reports');
  .then(function() {
    console.log("Remove succeeded.")
  .catch(function(error) {
    console.log("Remove failed: " + error.message)


Remove the results that match a query

var eventContactsRef = firebase.database().ref('events-contacts'); 
var query = eventContactsRef.orderByChild('eventContactId').equalTo(eventContactId); query.on('child_added', function(snapshot) {

firebase().database().ref('reports').orderByChild('date').equalTo('2017-07-25').on('child_added', function (snapshot) {


Do you need to hide your Firebase API keys for Ionic apps?



here are some good resources to get up to speed: Youtube Firebase Email Login/Authentication How to sync Lists from Firebase Master Detail Example Angular docs Victor Savkin’s blog Thoughtram’s Angular 2 blog Official Blog of firebase Official Docs Firebase Hosting

Victor Dias

Sharing mobile Experiences

Follow me