Search Posts

How to return asyncronously return data from firebase to devextreme grid in angular 4

Good day, could you help me with the question?

I’m trying to receive data from firebase to devextreme component.
I’m using angular4.

Here is the code of my html page:

<dx-data-grid [dataSource]="priorities">
<dxi-column dataField="Priority"></dxi-column>

In the class of my component I receive the data from database this way:

ngOnInit() {

  data => {
    for(var k = 0; k<data.length; k++){
      var prior = new priority();
      prior.Prioritie = data[k].toString();

where priorities is priorities: priority[] = [];

I receive the data from the database and create all the priotiry objects, but my devextreme component shows “No data”. What do I need to do to get it filled?

Source: AngularJS

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.