Skip to content

Instantly share code, notes, and snippets.

@gajus
Created September 29, 2014 11:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gajus/ee9e8eb49be5d2da0d3d to your computer and use it in GitHub Desktop.
Save gajus/ee9e8eb49be5d2da0d3d to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html ng-app="store">
<head>
<title>Store</title>
<script src="./static/js/angular.js"></script>
<script src="./static/js/store.js"></script>
<script src="./static/js/controllers/store.js"></script>
<script src="./static/js/controllers/productListControllers.js"></script>
<script src="./static/js/filters/customFilters.js"></script>
<script src="./static/js/components/cart/cart.js"></script>
<script src="./static/js/ngmodules/angular-route.js"></script>
<link rel="stylesheet" type="text/css" href="./static/css/main.css">
</head>
<body ng-controller="storeController">
<div id="body">
<div class="error" ng-show="data.error">Error ({{data.error.status}}): The product data was not loaded.</div>
<cart-summary></cart-summary>
<ng-view></ng-view>
</div>
</body>
</html>
angular
.module('store', ['customFilters', 'cart', 'ngRoute'])
.config(function ($routeProvider) {
$routeProvider.when('/checkout', {
templateUrl: './static/js/views/checkoutSummary.html'
});
$routeProvider.when('/products', {
templateUrl: './static/js/views/productList.html'
});
$routeProvider.otherwise({
templateUrl: './static/js/views/productList.html'
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment