JSFiddle - React, Tailwind, and code Playground
HTML
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.13/angular.min.js"></script>
<script src="https://code.angularjs.org/1.2.13/angular-route.min.js"></script>
<script src="https://code.angularjs.org/1.3.3/angular-resource.js"></script>
<body ng-app="exampleApp">
<div class="content" ng-controller="AppController">
{{ results }}
<div class="panel" ng-repeat="video in videos">
<div class="panel-heading clearfix">
<h3 class="panel-title">{{ video.title }}</h3>
<user class="pull-right">{{ video.user }}</user>
</div>
<p class="well">
<img ng-src="{{ video.thumbnail }}" alt=""/>
{{video.description}}
</p>
</div>
</div>
</body>
JavaScript
var app = angular.module('exampleApp', ['videoServices',]);
app.controller('AppController', ['$scope', 'Results',
function($scope, Results) {
$scope.page = 1;
$scope.results = Results().then(function(res){
$scope.videos = res['results'];
});
}
]);
var videoServices = angular.module('videoServices', ['ngResource']);
videoServices.factory('Results', ['$http',
function($http){
return function() {
return $http.post('/echo/json/','json='+JSON.stringify({
"count": 21975,
"next": "sdf",
"previous": null,
"results": [
{
"id": 22416,
"video_id": "9RAvpnWvynk",
"title": "sdsdsd",
"description": ""
},
{
"id": 22415,
"video_id": "ohgUhgf-dk",
"title": "sdsdsd",
"description": ""
}
]
}), {headers: {'Content-Type':'application/x-www-form-urlencoded'}} ).then(function(res){
return res.data ; });
};
}]);