1

Hi I'm trying to implement angular2-datatable for my Angular 2 app, but I have a question: How can I pass de array info from angularfire2 observable to the data-table?, here is an image of the example they use and my explanation :

enter image description here

So my question is how do I replace mf.data for items in the *ngFor sentence? Thanks in advance for any tip.

0

1 Answer 1

0

You have to subscribe to the observable.

let data = af2.db.list('/data').subscribe(
    (elems) => {
      this.data = elems;
    }
);
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.