Angular2 and Firebase: How to update a reactiveForm (DataDiven) (formBuilder / FormControl / FormControl)

29 views
Skip to first unread message

Augusto Carvalho

unread,
Jan 23, 2017, 2:28:28 PM1/23/17
to Angular
Hello everyone. I am trying to create a simple application that stores user profile information after subscriptions. After user´s  subscription it works fine, the profile data is saved in the database. 

But I want to give to the users de ability to change its profile data, for this I built a ProfileComponent that reads firebase data via observable or promisse, so after login the user could change all the profile information, unfortunately the data is read, but not shown.

In a template driven forms we pass values by databind and async filtes, I wonder how to pass a observable or promisse to a data driven form. 
Regards

Sander Elias

unread,
Jan 25, 2017, 2:46:44 AM1/25/17
to Angular and AngularJS discussion
Hi Augusto,

You can use the subscribe method in your controller to update your data driven form.

Regards
Sander

Augusto Carvalho

unread,
Jan 26, 2017, 11:13:37 AM1/26/17
to Angular and AngularJS discussion
Hi Sander, thank you for the answer. I'll try this! 
Reply all
Reply to author
Forward
0 new messages