title: how to write the controller in angular js?
body: <p>I have json and rest call. How to write the searchController in angular js. Can you please help me.Advance thank you. </p>
  
  <pre><code>url :- `http://local.agon.org/api/members/search/raju`
  </code></pre>
  
  <p>Json data : - </p>
  
  <pre><code> [
    {
      "id": 3,
      "name": "Raju",
      "phone": 1597536841,
      "photo": null,
      "skill_level": "intermediate",
      "rfid": "45128",
      "created_at": "2016-10-20 14:39:32",
      "updated_at": "2016-10-20 14:39:32"
    }
  ]
  </code></pre>
  
  <p>Method : <code>GET</code></p>
  
  <p>html code for search button :-</p>
  
  <pre><code>&lt;html ng-app="MemberCreateApp"&gt;
      &lt;body&gt; 
         &lt;form class="navbar-form navbar-left" ng-controller="searchController" ng-click="search()"&gt;
          &lt;div class="form-group"&gt; 
             &lt;input type="text" class="form-control input-lg" name="query" id="query" ng-model="query" placeholder="Search"/&gt;
           &lt;/div&gt;
          &lt;button type="submit" class="btn btn-primary btn-circle btn-lg"&gt;      
             &lt;i class="fa fa-search"&gt;&lt;/i&gt; 
          &lt;/button&gt;          
        &lt;/form&gt; 
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>