Skip to content

Instantly share code, notes, and snippets.

@chelsea
Forked from radar/order_app.html
Created April 2, 2014 03:39
Show Gist options
  • Save chelsea/9927585 to your computer and use it in GitHub Desktop.
Save chelsea/9927585 to your computer and use it in GitHub Desktop.
<html ng-app='order'>
<head>
<script src='http://localhost:3000/assets/angular.js'></script>
<script src='http://localhost:3000/assets/angular-route.js'></script>
<script src='order_app.js'></script>
</head>
<body>
<div ng-view>
stuff goes here
</div>
</body>
</html>
Spree = {}
Spree.Admin = {}
Spree.Admin.OrderApp = angular.module('order', ['ngRoute'])
Spree.Admin.OrderApp.config(['$routeProvider', function ($routeProvider) {
$routeProvider.
otherwise({
controller: 'HomeCtrl'
})
}
])
Spree.Admin.OrderApp.controller('HomeCtrl', ['$scope', '$location', function($scope, $location) {
console.log($location)
$scope.foo = 'bar'
}])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment