|
'use strict';
/**
* @ngdoc overview
* @name siteOficinaItapetiApp
* @description
* # siteOficinaItapetiApp
*
* Main module of the application.
*/
angular
.module('siteOficinaItapetiApp', [
'ngAnimate',
'ngAria',
'ngCookies',
'ngMessages',
'ngResource',
'ngRoute',
'ngSanitize',
'ngTouch',
'ui.router'
])
.config(['$stateProvider', '$urlRouterProvider', '$httpProvider', function($stateProvider, $urlRouterProvider, $httpProvider) {
// Configs
//Enable cross domain calls
$httpProvider.defaults.useXDomain = true;
//Remove the header used to identify ajax call that would prevent CORS from working
delete $httpProvider.defaults.headers.common['X-Requested-With'];
// UI router
// For any unmatched url, redirect to /state1
$stateProvider
.state('home', {
url: '/',
templateUrl: 'views/main.html',
controller: 'MainCtrl'
})
.state('sobre', {
url: '/sobre',
templateUrl: 'views/sobre.html',
controller: 'MainCtrl'
})
.state('servicos', {
url: '/servicos',
templateUrl: 'views/servicos.html',
controller: 'MainCtrl'
}).state('contato', {
url: '/contato',
templateUrl: 'views/contato.html',
controller: 'MainCtrl'
}).state('corte-laser', {
url: '/corte-laser',
templateUrl: 'views/corte-laser.html',
controller: 'MainCtrl'
}).state('impressao-3d', {
url: '/impressao-3d',
templateUrl: 'views/impressao-3d.html',
controller: 'MainCtrl'
}).state('eletronica', {
url: '/eletronica',
templateUrl: 'views/eletronica.html',
controller: 'MainCtrl'
});
$urlRouterProvider.otherwise('/');
}]);
|