title: AngularJs - how to support a textbox with hyperlinks
body: <p>I'm new to Angular but I'm trying to implement a textbox that allows users to enter in links.  I only want to support links, and otherwise I want to block all html from being presented as such.  I could theoretically use something other than a textarea, but my requirements are that it must be bound to a variable in my scope (right now with ng-model) and I cannot accept html tags other than '&lt; a >'</p>
  
  <p>Here is my example <a href="http://plnkr.co/edit/XyJs1GFBkObzzaiSAWr7?p=preview" rel="nofollow">plnkr</a></p>
  
  <p>In the example, I would like the second seeded item to display as a link, blue and underlined.  However, the third item should display as it is currently shown (without interpreting it as html).</p>
  
  <p>HTML: </p>
  
  <pre><code>&lt;textarea maxlength="160" ng-model="val.text"&gt;&lt;/textarea&gt;
  &lt;div class="btn" ng-click="submit()"&gt;Submit&lt;/div&gt;
  &lt;br&gt;&lt;br&gt;
  &lt;div ng-repeat="item in items"&gt;
    {{display(item)}}
  &lt;/div&gt;
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>$scope.submit = function() {
    if (!$scope.val.text) return
    $scope.items.push($scope.val.text);
  }
  $scope.display = function(txt) {
    return txt; 
    // something here?  if txt contains &lt;a&gt; and &lt;/a&gt; indicate 
    // that we should display as html
  }
  </code></pre>