title: How to get JSON data from a file into an angular directive
body: <p>This is my folder structure</p>
  
  <p>project<br>
  -->javascript-->classroom-->classroom-->classdetail-->controller-->classcontrol.js<br>
   directive-->classdetailDirective.js(directive and controller are at the same level, ie after the classdetail file)</p>
  
  <p>-->languages-->classroom-->classroomdata.json</p>
  
  <p>-->templates-->classroom-->classroom-->classdetail-->classdetail.html<br>
    directives--classdetailDirective.html (classdetail folder opens classdetail.html and directives folder which in turn gives access to classdetailDirective.html)</p>
  
  <p>The json file has the data {"classSize" : "60"}  </p>
  
  <p>This is how the classdetailDirective.js file looks like   </p>
  
  <pre><code>app.directive('classDetail', function(){  
  return{  
  restrict : 'E',  
  scope : {isPresent: '='  
  },  
  templateUrl : 'templates/classroom/classroom/classdetail/directives/classdetailDirective.html'  
  }  
  });
  </code></pre>
  
  <p>The controller is not doing anything at the moment. Any form of modification will do.</p>
  
  <p>In the classdetailDirective.html, I want to show the classSize information in the form of a tooltip.  </p>
  
  <pre><code>&lt;div title="{{classSize}}"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>I tried using $http.get but it didn't work. I have no clue how to get this done. Please help. I again, apologize for the way I wrote this question. This is the first time.</p>