title: Parse JSON and show data in Angular
body: <p>I have a trouble with displaying JSON data in Angular. I successfully send data from backend to frontend (Angular), but I cannot display them.</p>
  
  <p>I tried to simulate a similar situation on <a href="http://jsfiddle.net/29y61wtg/2/" rel="noreferrer">JSFiddle</a>, although I already have prepared data from backend <img src="https://i.stack.imgur.com/tMN37.png" alt="following format"></p>
  
  <p>get/send data -> Backend side:</p>
  
  <pre><code>//push data to Redis
  var messages= JSON.stringify(
      [
          {
              "name": "Msg1",
              "desc": "desc Msg1"
          },
          {
              "name": "Msg2",
              "desc": "desc Msg2"
          },
          {
              "name": "Msg3",
              "desc": "desc Msg3"
          },
          {
              "name": "Msg4",
              "desc": "desc Msg4"
          }
      ]);
      redisClient.lpush('list', messages, function (err, response) {
          console.log(response);
      });
  
  //get from redis and send to frontend
  app.get('/messages', function(req, res){
      // Query your redis dataset here
      redisClient.lrange('list', 0, -1, function(err, messages) {
          console.log(messages);
         // Handle errors if they occur
         if(err) res.status(500).end();
         // You could send a string
         res.send(messages);
         // or json
         // res.json({ data: reply.toString() });
      });
  });
  </code></pre>
  
  <p>get data -> frontend (Angular)</p>
  
  <pre><code>angular.module('app')
      .controller('MainCtrl', ['$scope', '$http', function ($scope, $http) {
          'use strict';
  
          getFromServer();
          function getFromServer(){
            $http.get('/messages')
                 .success(function(res){
                     $scope.messages= res;
                     console.log(res);
                 });
          }
      }])
  </code></pre>
  
  <p>HTML part with ng-repeat directive:</p>
  
  <pre><code>&lt;div ng-app="app" ng-controller="MainCtrl" class="list-group"&gt;
      &lt;div class="list-group-item" ng-repeat="item in messages"&gt;
          &lt;h4 class="list-group-item-heading"&gt;{{item.name}}&lt;/h4&gt;
          &lt;p class="list-group-item-text"&gt;{{item.desc}}&lt;/p&gt;
      &lt;div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Would anyone know what the problem is?</p>