title: How to clear one View's Input value from other View?
body: <p>My scenario is so simple and straight forward. But I'm failing to get the exact output.</p>
  <p>In my case, I'm having two html page named as, Index.htm, Main.htm and One script page named as mscript.js. Index.htm consists of one button (Clear) and Main.htm consists of one input type field as text.</p>
  <p><strong>What I want is:</strong></p>
  <p>On clicking of button(from Index view), the text entered  by the user in the input type field(from Main view) has to be cleared.</p>
  <p><strong>What i tried is</strong></p>
  <p>I have used configuration block.</p>
  <p><strong>Index.htm:</strong></p>
  <pre><code>&lt;div data-ng-app=&quot;mangular&quot;&gt;
      &lt;div data-ng-controller=&quot;mcontroller&quot;&gt;Strictly for Demo Purpose
          &lt;br /&gt;
          &lt;br /&gt;
          &lt;br /&gt;
          &lt;div data-ng-view=&quot;&quot;&gt;&lt;/div&gt;
          &lt;br /&gt;
          &lt;button type=&quot;submit&quot; data-ng-click=&quot;clear()&quot;&gt;Clear&lt;/button&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  <p><strong>Main.htm</strong></p>
  <pre><code>&lt;div&gt;
    Type your Name : 
    &lt;input type = &quot;text&quot; data-ng-model = &quot;demotext&quot; /&gt;
  &lt;/div&gt;
  </code></pre>
  <p><strong>mscript.js</strong></p>
  <pre><code> var mangular = angular.module('mangular', ['ngRoute']);
  
  mangular.config(function ($routeProvider) {
      $routeProvider.when('/', {
          templateUrl: 'Main.htm'
      })
  });
  
  mangular.controller('mcontroller', function ($scope) {
  
      //var test = mfactory.getinput();
      $scope.clear = function () {
          $scope.demotext = &quot;&quot;; // This is the place where I'm expecting solution
      }
  });
  </code></pre>