What is the easiest way to input text into a textbox, click a button using ng-click, and then send that text from the textbox to an array? I've indicated where code needs to go with question marks, but I'm unsure of what exactly to write. Here's the code snippet I have:
This is how my HTML appears:
<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">
Below is the JavaScript array where I want the entered text to be stored in the "Name" and "Description" properties.
$scope.addWorkflow = function(?, ?) {
var workflow = {
Id: 0,
Name: ?,
Description: ?,
Lens: "",
Focus: "",
Aperture: ""
}
$scope.workflows.push(workflow);
};