Last submitted value: {{ submitValue }}
<!DOCTYPE html>
<html> <head> <script type='text/javascript'> <!--from infovision--> var app = angular.module("app", []); app.controller("FormCtrl", ["$scope", function FormCtrl($scope) { $scope.submit = function() { $scope.submitValue = $scope.test; }; }]); </script> </head> <body ng-app="app"> <div ng-controller="FormCtrl"> <input type="text" name="test" ng-model="test" /> <button type="button" ng-click="submit()">Submit</button> Last submitted value: {{ submitValue }} </div> </body> </html> |