title: angularjs resetting input fields to default values
body: <p>Have a couple of input fields which are set to default values, want to be able to reset them to their default values with a button if there is any input in the fields.</p>
  
  <pre><code>    &lt;div class=form name="searchForm"&gt;
      &lt;li&gt;&lt;ul&gt;&lt;label&gt;Continent&lt;/label&gt;&lt;/ul&gt;
              &lt;ul&gt;&lt;select data-ng-model="ContinentValue"&gt;
                      &lt;option value="Asia"&gt;Asia&lt;/option&gt;
                      &lt;option value="Europe"&gt;Europe&lt;/option&gt;
                      &lt;option value="South America"&gt;South America&lt;/option&gt;
                      &lt;option value="North America"&gt;North America&lt;/option&gt;
                      &lt;option value="Africa"&gt;Africa&lt;/option&gt;
                      &lt;option value="Oceania"&gt;Ociania&lt;/option&gt;
                      &lt;/select&gt;
              &lt;/ul&gt;
      &lt;li&gt;
          &lt;ul&gt;&lt;label&gt;Population Greater than&lt;/label&gt;&lt;/ul&gt;
          &lt;ul&gt;&lt;input type="number" data-ng-model="popValueMin"&gt;&lt;/ul&gt;
          &lt;ul&gt;&lt;label&gt;Lesser than&lt;/label&gt;&lt;/ul&gt;
          &lt;ul&gt;&lt;input type="number" data-ng-model="popValueMax"&gt;&lt;/ul&gt;
      &lt;/li&gt;
  
  
  &lt;li&gt;
      &lt;ul&gt;&lt;label&gt;Government Form&lt;/label&gt;&lt;/ul&gt;
      &lt;ul&gt;&lt;input type="text" data-ng-model="govForm"&gt;&lt;/input&gt;&lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;
  &lt;ul&gt;&lt;label&gt;Country name&lt;/label&gt;&lt;/ul&gt;
      &lt;ul&gt;&lt;input type="text" data-ng-model="countName"&gt;&lt;/input&gt;&lt;ul&gt;
      &lt;/li&gt;
  &lt;div data-ng-controller="resetCtrl"&gt;
          &lt;button data-ng-click="resetModel()"&gt;Reset&lt;/button&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Three input values are set to default in my allController:</p>
  
  <pre><code>$rootScope.popValueMax = parseInt("146934000");
          $rootScope.ContinentValue = "Europe";
          $rootScope.popValueMin = parseInt("0");
  </code></pre>
  
  <p>Using another controller to reset:</p>
  
  <pre><code>controllers.controller("resetCtrl", ["$rootScope", function($rootScope) {
  
       $rootScope.resetModel = function(){
       $rootScope.popValueMax = parseInt("146934000");
       $rootScope.ContinentValue = "Europe";
       $rootScope.popValueMin = parseInt("0");
       $rootScope.govForm = "";
       $rootScope.countName = "";
     };
  
    }]);
  </code></pre>
  
  <p>Been looking around at many similar threads here, tried alot of the solutions available but nothing seems to work.</p>