Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
275
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import { Component } from '@angular/core';
  2. import { AngularFireDatabase, AngularFireList } from 'angularfire2/database';
  3.  
  4. @Component({
  5.   selector: 'app-root',
  6.   templateUrl: './app.component.html',
  7.   styleUrls: ['./app.component.scss']
  8. })
  9.  
  10. export class AppComponent {
  11.   constructor(private af: AngularFireDatabase) {
  12.     const courses$: AngularFireList<any> = af.list('courses');
  13.  
  14.     courses$.valueChanges().subscribe(val => console.log(val));
  15.   }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement