title: Save Data from form on button click
body: <p>How to save data from the form by clicking on the button?
  I do not understand where the error is. 
  As planned, when you click on the data from the field stored in the variable "master"</p>
  
  <p>For example I use this tutorial: <a href="http://www.w3schools.com/angular/angular_forms.asp" rel="nofollow noreferrer">http://www.w3schools.com/angular/angular_forms.asp</a></p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"&gt;&lt;/script&gt;
  &lt;body&gt;   &lt;div ng-app="myApp" ng-controller="formCtrl"&gt;
    &lt;form novalidate&gt;
      First Name:&lt;br&gt;
      &lt;input type="text" ng-model="firstName"&gt;&lt;br&gt;
      &lt;button ng-click="copyData()"&gt;Click Me!&lt;/button&gt;
    &lt;/form&gt;
    &lt;p&gt;form = {{user}}&lt;/p&gt;
    &lt;p&gt;master = {{master}}&lt;/p&gt;
  &lt;/div&gt;
    &lt;script&gt;
  var app = angular.module('myApp', []);
  app.controller('formCtrl', function($scope) {
      $scope.master = {uder.firstName};
      $scope.reset = function() {
          $scope.user = angular.copy($scope.master);
      };
      $scope.reset();
      $scope.copyData=function(){
          $scope.master1=angular.copy($scope.mas);
         $scope.copyData();
  }
  });
  &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>