var app = angular.module('app', ['ngRoute', 'ui.bootstrap', 'cgNotify']); app.config(['$routeProvider', '$locationProvider', function ($routeProvider, $locationProvider) { $locationProvider.html5Mode(true); $routeProvider .when('/:hash', { templateUrl: 'views/main.html', controller: 'facturaCtrl' }) .when('/create/:hash', { templateUrl: 'views/createOrEditPedido.html', controller: 'createPedidoCtrl' }) .when('/edit/:hash/:id', { templateUrl: 'views/createOrEditPedido.html', controller: 'editPedidoCtrl' }) .otherwise({ redirectTo: '/' }); }]);