genofire/hs_monolith
genofire
/
hs_monolith
Archived
1
0
Fork 0
This repository has been archived on 2020-09-27. You can view files and clone it, but cannot push or open issues or pull requests.
hs_monolith/webroot/static/js/main.js

47 lines
1.2 KiB
JavaScript

angular.module('microStock', [
'angular-loading-bar',
'ngAnimate',
'ui.router'
])
.config(['$urlRouterProvider','$httpProvider',function($urlRouterProvider,$httpProvider){
$urlRouterProvider.otherwise('/');
$httpProvider.defaults.withCredentials = true;
}])
.config(['$stateProvider',function ($stateProvider) {
$stateProvider
.state('list', {
url: '/',
templateUrl: '/static/html/list.html',
controller: 'ListCtrl'
})
.state('item', {
url: '/product/:productid',
templateUrl: '/static/html/item.html',
controller: 'ItemCtrl'
})
.state('item-add', {
url: '/product/:productid/add',
templateUrl: '/static/html/item-add.html',
controller: 'ItemAddCtrl'
})
.state('statistics', {
url: '/statistics',
templateUrl: '/static/html/statistics.html',
controller: 'StatisticsCtrl'
});
}]);
var config = {
'store': {
'status': '/api/status',
'goods': {
'productById': '/api/good/%d'
},
},
'microservice_dependencies': {
'products': 'http://localhost:8080/api-test/product/',
'productById': 'http://localhost:8080/api-test/product/%d/'
}
};