title: Run Javascript after JSON load
body: <p>I am trying to run some javascript after the data from JSON has successfully loaded so I can then manipulate my dom elements, but having trouble accomplishing this as when I run my javascript, the elements are not loaded yet. </p>
  
  <pre><code>app.controller('portfolioController', function($scope, $route, $http) {
   $scope.contents = null;
    $http.get("js/json/portfolio.json").success(function(data) {
      $scope.contents = data;
      alert('alert this after all elements are loaded on dom');
    });
  });
  
  &lt;ul class="projects basic" &gt;
      &lt;li ng-repeat="content in contents"&gt;
          &lt;img src="img/projects/{{ content.image }} " &gt;
          &lt;a class="hover" &gt;&lt;/a&gt;
      &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>