Pass Textbox Data To A Javascript Array Using Angular -
what simplest way type in textbox, ng-click button , send text textbox array? i've put question marks show know code goes, i'm not sure what. here's code: my html looks this: <input class="textbox" style="width: 320px; color:black; margin-bottom:20px" type="text"/> <input class="button" style="width:100px" ng-click="addworkflow(?,?); toggleshow('addworkflow')" type="submit" value="add"> this js array want typed text go to, "name" , "description" objects. $scope.addworkflow = function(?, ?) { var workflow = { id: 0, name: ?, description: ?, lens: "", focus: "", aperture: "" } $scope.workflows.push(workflow); }; well try this: $scope.addworkflow = function(newworkflow) { var workflow = { id: 0, name:"this want text text box appear.", ...