Skip to content

Instantly share code, notes, and snippets.

@formula1
Created February 17, 2015 23:29
Show Gist options
  • Save formula1/e4be0a9263da28c59d5a to your computer and use it in GitHub Desktop.
Save formula1/e4be0a9263da28c59d5a to your computer and use it in GitHub Desktop.
Proof of Concept
<!doctype html>
<html>
<head>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.13/angular.min.js"></script>
<script type="text/javascript">
var path = "/NodeOS/NodeOS/issues";
</script>
</head>
<body>
<h1>NodeOs Blog</h1>
<section ng-app="NodeOsBlog" ng-controller="BlogListCtrl" id="articles">
<article ng-repeat="item in blog">
<header class="{{item.state}}">
<h3 class="title">{{item.title}}</h3>
<a href="https://github.com/NodeOS/NodeOS/issues/{{item.number}}">View on Github</a>
</header>
<pre class="content">{{item.body}}</pre>
<footer>
<a href="https://github.com/NodeOS/NodeOS/issues/{{item.number}}" class="comments">
There are {{item.comments}} comments.
</a>
</footer>
</article>
</section>
<script type="text/javascript">
var $articles = void(0);
var NodeOsBlog = angular.module('NodeOsBlog', []);
NodeOsBlog.controller('BlogListCtrl', function ($scope, $http) {
$http.get('https://api.github.com/repos/NodeOS/NodeOS/issues?labels=blog&sort=created')
.success(function(data) {
$scope.blog = data;
});
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment