-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.js
More file actions
39 lines (36 loc) · 1.27 KB
/
main.js
File metadata and controls
39 lines (36 loc) · 1.27 KB
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
var productApp = angular.module('productApp', ['ngRoute', 'ngAnimate', 'ui.bootstrap']);
productApp.config(function($routeProvider){
$routeProvider
.when('/home',{
templateUrl : 'views/home/index.html'
})
.when('/mentions', {
templateUrl : 'views/mention/index.html',
controller : 'mentionCtrl'
})
.when('/contact', {
templateUrl : 'views/contact/index.html',
controller : 'contactCtrl'
})
.when('/product', {
templateUrl : 'views/product/index.html',
controller : 'productCtrl'
})
.when('/product/add', {
templateUrl : 'views/product/add.html',
controller : 'productCtrl'
})
.when('/product/edit/:id', {
templateUrl : 'views/product/edit.html',
controller : 'productCtrl'
})
.when('/product/details/:id', {
templateUrl : 'views/product/details.html',
controller : 'productCtrl'
})
.otherwise({
redirectTo : '/home'
})
})
productApp.constant('urlWebApi', 'http://10.105.10.8:3000/api');
productApp.constant('configProductApp', {itemPerPage : 5});