Skip to content

Instantly share code, notes, and snippets.

@mckennatim
Created March 28, 2014 01:39
Show Gist options
  • Save mckennatim/9823286 to your computer and use it in GitHub Desktop.
Save mckennatim/9823286 to your computer and use it in GitHub Desktop.
<!doctype html>
<html ng-app="project">
<head>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular-resource.min.js">
</script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular-route.min.js"></script>
</head>
<body>
<h2>Do you see anything in the view?:</h2>
<div ng-view></div>
</body>
</html>
var myApp = angular.module('project', ['ngResource', 'ngRoute'] );
myApp
.config(['$sceDelegateProvider', function($sceDelegateProvider) {
$sceDelegateProvider.resourceUrlWhitelist(['self', 'http://mhnystatic.s3.amazonaws.com/**', 'http://localhost:3000/**']);
}])
.config(function($routeProvider) {
$routeProvider.
when('/', {controller:ListCtrl, templateUrl:'http://localhost:3000/api/'}).
otherwise({redirectTo:'/'});
});
function ListCtrl() {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment