I have the following AngularJS app.
From $scope.forms I create some inputs on the html part using ng-repeat.
The thing I dont understand is how to push the data from attributes: ["title", "firstname", "lastname", "address"] inputs into values: []
Can someone explain me how to push the input values into my values key? Or maybe if there is a best solution to explain?
function sampleCtrl($scope) {
$scope.forms = [
{
title: "Something",
attributes: ["title", "firstname", "lastname", "address"],
values: [] //here i want the values from the attributes
},
{
title: "Something else",
attributes: ["title", "name", "job", "address"],
values: [] //here i want the values from the attributes
} ]; }