Skip to content

Instantly share code, notes, and snippets.

@ajspeller
Created August 26, 2017 13:06
Show Gist options
  • Select an option

  • Save ajspeller/a8355e51c7f2e2c791bc09cf357bdba1 to your computer and use it in GitHub Desktop.

Select an option

Save ajspeller/a8355e51c7f2e2c791bc09cf357bdba1 to your computer and use it in GitHub Desktop.

Revisions

  1. ajspeller created this gist Aug 26, 2017.
    17 changes: 17 additions & 0 deletions display-cuisine.component.ts
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    private subscription;
    cuisines;

    constructor(private _af: AngularFire) {}

    ngOnit() {
    this.subscription = this._af
    .database.list('cuisines')
    .subscribe( () => {
    this.cuisines = x;
    console.log(this.cuisines);
    });
    }

    ngOnDestroy() {
    this.subscription.unsubscribe();
    }