I have a dashboard application written in angular 2. I am using api call for the the data. After retrieving the data I render them in the graph. As the demo link below. When I make a api call from ngOnInit() method of dashboardcomponent I get null response but if I do same thing using a button click event all data loads as expected. What is the best place/initiate to make a api call and populate all the data in UI at the first load itself?
Aucun commentaire:
Enregistrer un commentaire