title: AngularJS get data from json
body: <p>I'm trying to get from Json data but it doesn't worked for me. I'm not sure what I'm doing wrong.</p>
  
  <p>Angular Ajax API call :</p>
  
  <pre><code>&lt;script&gt;
      function PostsCtrlAjax($scope, $http) {
          $http({
              method: 'POST',
              url: 'js/posts.json'
          }).success(function(data) {
              $scope.posts = data.deals;; // response data 
          });
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>HTML Data Binding</p>
  
  <pre><code>&lt;div id="ng-app" ng-app ng-controller="PostsCtrlAjax"&gt;
      &lt;div ng-repeat="post in posts"&gt;
           &lt;h2&gt;
      &lt;a href='{{post.url}}'&gt;{{post.title}}&lt;/a&gt;
      &lt;/h2&gt;
  
          &lt;div class='time'&gt;{{post.time}} - {{post.author}}&lt;/div&gt;
          &lt;p&gt;{{post.description}}&lt;/p&gt;
          &lt;img ng-src="{{post.banner}}" /&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Posts.json:</p>
  
  <pre><code>{
     "result":"SUCCESS",
     "resultMessage":"",
     "deals":[
        {
           "title":"Multiple Ajax Image Upload without Refreshing Page using Jquery.",
           "url":"http://www.9lessons.info/2013/08/multiple-ajax-image-upload-refreshing.html",
           "banner":"https://lh5.googleusercontent.com/-VWIAbbjR1QM/Uf_v9v9LCbI/AAAAAAAAIAo/4ZhYhP3lcCg/s550/multiple.jpg",
           "description":"Today I am presenting the most important social networking feature called multiple ajax image upload without refreshing the page using jquery and PHP. We just modified few lines of code in jqery.form.js plugin and renamed that to jquery.wallform.js. This feature is one of the key feature in Wall Script sale, big thanks to Arun Sekar for this code trick.",
           "time":"Tuesday, August 6, 2013",
           "author":"Srinivas Tamada"
        },
        {
           "title":"Wall Script 6.0",
           "url":"http://www.9lessons.info/2013/07/wall-script.html",
           "banner":"https://lh5.googleusercontent.com/-ErPa0tEQgLs/UfZzaQ3NcFI/AAAAAAAAH7o/h_KH8Rf4AXs/s550/WallBanner.jpg",
           "description":"Introducing the brand new Wall Script 6.0 with enrich social network features. Exactly year later I did released Wall Script previous version, it got awesome response and outstanding sale. This script IDEA was came out from my imagination, introducing powerful features like Conversations, OEmebd URL expanding system, Like/Share and Multiple image slider.",
           "time":"MONDAY, JULY 29, 2013",
           "author":"Srinivas Tamada"
        }
     ],
     "total":1207
  }
  </code></pre>
  
  <p>I want get from json file  title, url, banner etc. But I didn't get any data from my json file. How can i do that?</p>