app.controller("MainController", function($scope) { $scope.inputfName = ""; $scope.inputLastName = ""; $scope.addNew = function() { //This is where I am stuck! }; });
<div id='content' ng-app='MyApp' ng-controller='MainController'> <label>First Name:</label> <input type="text" ng-model="inputfName"/> <br/> <label>Last Name::</label> <input type="text" ng-model="inputLastName"/> <button ng-click="addNew()">Add New</button> </div>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)