-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
92 lines (89 loc) · 3.58 KB
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
var app = angular.module('Servidor', ['ngRoute', 'ngSanitize']);
app.config(['$httpProvider', function ($httpProvider) {
$httpProvider.defaults.useXDomain = true;
delete $httpProvider.defaults.headers.common['X-Requested-With'];
}]).config(function ($routeProvider, $locationProvider) {
$routeProvider
.when('/', {
templateUrl: 'app/views/BlogServidorLegal/posts.html',
controller: 'PostsServidorLegalCtrl'
})
.when('/posts', {
templateUrl: 'app/views/BlogServidorLegal/posts.html',
controller: 'PostsServidorLegalCtrl'
})
.when('/posts/page/:page/:ultimoitem', {
templateUrl: 'app/views/BlogServidorLegal/posts.html',
controller: 'PostsServidorLegalCtrl'
})
.when('/post/:url', {
templateUrl: 'app/views/BlogServidorLegal/post.html',
controller: 'PostsServidorLegalCtrl'
})
.when('/posts/buscar/:nome', {
templateUrl: 'app/views/BlogServidorLegal/posts.html',
controller: 'PostsServidorLegalCtrl'
})
.when('/posts/buscar/:nome/page/:page/:ultimoitem', {
templateUrl: 'app/views/BlogServidorLegal/posts.html',
controller: 'PostsServidorLegalCtrl'
})
.when('/posts/interesse/:campo', {
templateUrl: 'app/views/BlogServidorLegal/posts.html',
controller: 'PostsServidorLegalCtrl'
})
.when('/posts/interesse/:campo/page/:page/:ultimoitem', {
templateUrl: 'app/views/BlogServidorLegal/posts.html',
controller: 'PostsServidorLegalCtrl'
})
.when('/posts/autor/:autor', {
templateUrl: 'app/views/BlogServidorLegal/posts.html',
controller: 'PostsServidorLegalCtrl'
})
.when('/posts/autor/:autor/page/:page/:ultimoitem', {
templateUrl: 'app/views/BlogServidorLegal/posts.html',
controller: 'PostsServidorLegalCtrl'
})
.when('/posts/categoria/:categoria', {
templateUrl: 'app/views/BlogServidorLegal/posts.html',
controller: 'PostsServidorLegalCtrl'
})
.when('/posts/categoria/:categoria/page/:page/:ultimoitem', {
templateUrl: 'app/views/BlogServidorLegal/posts.html',
controller: 'PostsServidorLegalCtrl'
})
.when('/posts/tags/:tags', {
templateUrl: 'app/views/BlogServidorLegal/posts.html',
controller: 'PostsServidorLegalCtrl'
})
.when('/posts/tags/:tags/page/:page/:ultimoitem', {
templateUrl: 'app/views/BlogServidorLegal/posts.html',
controller: 'PostsServidorLegalCtrl'
})
.when('/interesses', {
templateUrl: 'app/views/Site/CamposdeInteresse/interesses.html',
controller: 'CamposdeInteresseCtrl'
})
.when('/interesses/:nome', {
templateUrl: 'app/views/Site/CamposdeInteresse/interesses.html',
controller: 'CamposdeInteresseCtrl'
})
.when('/contato', {
templateUrl: 'app/views/Contact/contato-novo.html',
})
.when('/sobre-nos', {
templateUrl: 'app/views/Sobre/sobre-nos.html',
})
.otherwise({
redirectTo: '/'
});
//$locationProvider.html5Mode(true);
});
app.handleSuccess =
function (response) {
return (response.data);
};
app.handleError =
function (response) {
return response.data.message;
};