title: Angular $scope module value lost on form submit
body: <p>I am instantiating an object that is used to store my form values:</p>
  
  <pre><code>$scope.placeSomething = {
      SomethingType: 1
  }; 
  </code></pre>
  
  <p>And the form</p>
  
  <pre><code>&lt;form name="placeSomething" id="placeSomething" novalidate ng-submit="submitForm();"&gt;
     ...form stuff...
  &lt;/form&gt;
  </code></pre>
  
  <p>if i check the existance of the default value of<code>$scope.placeSomething.SomethingType</code> inside my controller, it prints <code>1</code> - which is good.</p>
  
  <p>But when i'm submitting the form, the default value is lost (unless i'm applying another value to <code>SomethingType</code> in some other function)</p>
  
  <pre><code>$scope.submitForm = function () {
      console.log($scope.placeSomething.SomethingType); // this returns undefined. the default values is lost
  });
  </code></pre>
  
  <p>If i use ng-init inside the form, angular keeps the default value and sends it with the form.</p>
  
  <pre><code>&lt;input type="hidden" ng-model="placeSomething.SomethingType" ng-init="placeSomething.SomethingType = 1"/&gt;
  </code></pre>
  
  <p>why is this happening?</p>
  
  <p><strong>Edit</strong></p>
  
  <p>Another funny thing, is that if i change the $scope value from other $scope, it does not get lost on submit.</p>
  
  <pre><code>$scope.SelectSomethingType = function (param, SomethingType, param2) {
              $scope.placeSomething.SomethingType = SomethingType;
  }); 
  </code></pre>
  
  <p>This function activated in one of the forms ng-clicks and saves the value to <code>SomethingType</code> just fine.</p>
  
  <p><strong>Solved</strong></p>
  
  <p><a href="https://stackoverflow.com/a/26905500/3628867">https://stackoverflow.com/a/26905500/3628867</a> This was the problem</p>