How to return the value of a custom widget unto the form

Hello, 

I previously posted a question regarding passing the data from a pure javascript custom widget into the form, however, I experimented quite a bit with it and found it to be easier to learn how to use AngularJS and make sure the form logic is handled in the controller. 

Now, I have a custom widget that builds an array of objects, and now I want to pass it into one of the attributes of the formInput for it to be processed into the database.

 

Regards,

 

Miguel

Figured it out. The first step is to create one or more properties inside the widget that will be the value or values you want the form to collect. Then, within the controller, assign the values of these properties with $scope.properties.[yourValueName].