Skip to content

Instantly share code, notes, and snippets.

@renatocantarino
Created August 15, 2014 13:36
Show Gist options
  • Save renatocantarino/1cf3a9344cbd838bf1fb to your computer and use it in GitHub Desktop.
Save renatocantarino/1cf3a9344cbd838bf1fb to your computer and use it in GitHub Desktop.
injecao.
<html ng-app>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.4/angular.js"></script>
<script>
var MeuController = function($scope, $http) {
$http.get('https://api.github.com/repos/angular/angular.js/commits')
.success(function(commits) {
$scope.commits = commits
})
}
</script>
</head>
<body ng-controller="MeuController">
<h1>Publicações para o projeto</h1>
<ul>
<li ng-repeat="commit in commits">
{{ commit.commit.committer.date | date }}
<a ng-href="https://github.com/angular/angular.js/commit/{{commit.sha}}">{{ commit.sha }}</a>
{{ commit.commit.message }}
</li>
</ul>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment