Angular DI - Example 4
AngularJS dependency injection example - failure with minified JS
HTML
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
<body ng-app="DemoApp" ng-controller="DemoController">
<h3>Angular Github Repositories</h3>
<ul>
<li ng-repeat="repo in repos">
<a ng-href="{{repo.html_url}}"> {{ repo.name }} </a>
</li>
</ul>
</body>
JavaScript
//Minified JS with inline dependencies. Won't work!
var app=angular.module("DemoApp",[]);app.controller("DemoController",function(o,p){p.$get("https://api.github.com/users/angular/repos").success(function(p){o.repos=p})});