title: Angular highlight/select all content inside <div> element Angular
body: <p>How do we highlight and select all content inside a  element on click using Angular JS ?.
  It is easy to do using inputbox. But how do we do for  element.</p>
  
  <p>Help would be appreciated.</p>
  
  <p>Thank you</p>
  
  <p>This is what I have used so far.</p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;div ng-controller="appController" ng-app="app"&gt;
      &lt;input type="text" ng-model="content" ng-click="onTextClick($event)" /&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>JS</strong></p>
  
  <pre><code>var app = angular.module('app', []);
    app.controller('appController',
      function ($scope) {
          $scope.content = 'test';
          $scope.onTextClick = function ($event) {
              $event.target.select();
          };
      });
  </code></pre>
  
  <p><a href="http://jsfiddle.net/onury/R63u5/" rel="nofollow">http://jsfiddle.net/onury/R63u5/</a></p>