| 12345678910111213141516171819202122232425 |
- var app = angular.module('app', ['ngRoute', 'ui.bootstrap', 'cgNotify']);
- app.config(['$routeProvider', '$locationProvider', function ($routeProvider, $locationProvider) {
- $locationProvider.html5Mode(true);
- $routeProvider
- .when('/', {
- templateUrl: 'views/error.html',
- controller: 'errorCtrl'
- })
- .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: '/'
- });
- }]);
|