I am new to Angular js and while integrating the Angular js with my Ruby on Rails application, but I am not able to receive the json response via $scope, copied below my codebase for your reference anybody's help would be really appreciated.
JS code:
app = angular.module('Entry', ['ngResource'])
function ListCtrl($scope, $resource) {
BlogEnrty = $resource("/blog_entries.json")
$scope.blog_entries = BlogEnrty.query();
}
HTML:
<html ng-app="Entry">
<div ng-controller='ListCtrl'>
<table>
<tr ng-repeat= "entry in entries">
{{entry.title}}
</tr>
</table>
</div>
</html>
Error:
[{"content":"Andy Dufresne is a young and successful banker whose life changes drastically when he is convicted and sentenced to life imprisonment for the murder of his wife and her lover. Set in the 1940's, the film shows how Andy, with the help of his friend Red, the prison entrepreneur, turns out to be a most unconventional prisoner.","created_at":"2013-02-03T10:54:44Z","id":1,"title":"The Shawshank Redemption","updated_at":"2013-02-03T10:54:44Z","user_id":1}]
Regards,
Logan