title: angular material md-autocomplete with redirection
body: <p>We have integrated md autocomplete functionality. But our requirement is like, upon selecting any value from md-autocomplete, is it possible to redirect to the corresponding page?</p>
  
  <pre><code>&lt;md-autocomplete
          ng-disabled="isDisabled"
          md-no-cache="noCache"
          md-selected-item="selectedItem"
          md-search-text-change="searchTextChange(searchText)"
          md-search-text="searchText"
          md-selected-item-change="selectedItemChange(item)"
          md-items="item in querySearch(searchText)"
          md-item-text="item.name"
          md-min-length="0"
          placeholder="Search"
          md-menu-class="autocomplete-custom-template"&gt;
          &lt;md-item-template&gt;
            &lt;span class="item-title"&gt;
              &lt;!--&lt;md-icon md-svg-icon="img/icons/octicon-repo.svg"&gt;&lt;/md-icon&gt;--&gt;
              &lt;span&gt; {{item.name}} &lt;/span&gt;
            &lt;/span&gt;
          &lt;/md-item-template&gt;
      &lt;/md-autocomplete&gt;
  </code></pre>
  
  <p>And I had written the function as below:</p>
  
  <pre><code>function selectedItemChange(item) {
          $log.info('Item changed to ' + JSON.stringify(item));
          if(item.key == 'doctor'){
              $location.path('/patient/account');
          }
          else if(item.key == 'speciality'){
              $location.path('/patient/account');
          }
  
      }
  </code></pre>
  
  <p>Its redirecting to the specifieed page, but app getting stuck on that page. Nothing will be working in that page.</p>
  
  <p>But when I try with following, its working perfectly.</p>
  
  <pre><code>&lt;div ng-click="testclick()"&gt;test&lt;/div&gt;
  $scope.testclick = function(){
      $location.path('/patient/account');
  }
  </code></pre>
  
  <p>When I choose the option from md-autocomplete, its going to the corresponding url. And all the links/buttons will work as normal. Again when i go to the same page and choose another md-autocomplete option,its redirecting to the corresponding page,but the links/buttons in that page is not working. I couldn't able to move from that page. My app gets stuck.</p>