title: How to use an object value as the href attribute of an element with AngularJS?
body: <p>AnglarJS newb here looking for some answers. I have these files,and HTML and a JSON file, what I want to do is use a link stablished as an attribute in the json and use it in a button or link tag.</p>
  
  <p>index.html</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;script src=          "http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"&gt;&lt;/script&gt;
  &lt;body&gt;
  
  &lt;div ng-app="templateApp" ng-controller="templateCtrl"&gt; 
  
  &lt;ul&gt;
  &lt;li ng-repeat="x in templates"&gt;
  {{ x.title}}
  &lt;/li&gt;
  &lt;li ng-repeat="x in templates"&gt;
  {{ x.limagen}}
  &lt;/li&gt;
  &lt;li ng-repeat="x in templates"&gt;
      {{x.lpagina}}
  &lt;/li&gt;
  
  &lt;a href ng-click="lpagina"&gt;
      &lt;script&gt;
              lpagina={{x.lpagina}};
      &lt;/script&gt;
  
      Link&lt;/a&gt;
  
  &lt;/ul&gt;
  
  &lt;img src="https://placeholdit.imgix.net/~text?  txtsize=25&amp;txt=400%C3%97100&amp;w=400&amp;h=100"&gt;&lt;/img&gt;
  
  &lt;/div&gt;
  
  &lt;script&gt;
  var app = angular.module('templateApp', []);
  app.controller('templateCtrl', function($scope, $http) {
  $http.get("obras.json")
  .success(function (response) {$scope.templates = response.obra;});
  });
  &lt;/script&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>And the json file (obras.json)</p>
  
  <pre><code>    {
     "obra": [
         {
             "title": "Sample Text",
             "limagen": "http://placehold.it/350x150",
             "lpagina": "http://stackoverflow.com/questions/25335140/creating-    a-button-link-with-json-params"
         }
     ]
  
  }
  </code></pre>
  
  <p>Thanks for any help you can give me!</p>