Check out example codes for "'push' does not exist on type 'Observable<any>'". It will help you in understanding the concepts better.

Code Example 1

import {Component} from '@angular/core';
import { AngularFireDatabase } from 'angularfire2/database';

@Component({
    selector: 'app-root',
    templateUrl: './app.component.html',
    styleUrls: ['./app.component.css']
})
export class AppComponent {
    courses$;
    courseObservable;
    authors$;
    constructor(db: AngularFireDatabase) {
        this.courseObservable = db.list('/courses');
        this.courses$ = this.courseObservable.valueChanges();
        this.authors$ = db.object('/authors/1').valueChanges();

    }
    add(course: HTMLInputElement) {
        this.courseObservable.push(course.value);
        course.value = '';
    }
}

Learn ReactJs, React Native from akashmittal.com