modificaciones ui-router para que cargue las subsistas

This commit is contained in:
nelo 2016-11-28 14:42:37 +01:00
parent a930b15963
commit f344f90885
3 changed files with 22 additions and 11 deletions

View File

@ -17,14 +17,13 @@ function config($stateProvider, $urlRouterProvider) {
core.splitingRegister.registerGraph(deps);
$urlRouterProvider.otherwise('/client/index');
$urlRouterProvider.otherwise('/client');
for (var file in routes)
routes[file].forEach(function (route) {
$stateProvider.state(route.state, {
url: route.url,
template: route.template,
views: route.views,
resolve: {
loader: loader(route)
}

View File

@ -5,7 +5,7 @@
<vn-left-menu items="$ctrl.items" descriptor="$ctrl.descriptor"></vn-left-menu>
</vn-empty>
<vn-auto>
<vn-customer-basic-data></vn-customer-basic-data>
<vn-vertical ui-view></vn-vertical>
</vn-auto>
</vn-horizontal>
</vn-vertical>

View File

@ -1,8 +1,20 @@
[{
url: '/client/index',
state: 'client-index',
[
{
url: '/client',
state: 'client',
template: '<vn-client-index full-height></vn-client-index>',
module: 'crud',
description: '',
image: '',
}]
},
{
url: '/basic-data',
state: 'client.details',
template: '<vn-customer-basic-data full-height></vn-customer-basic-data>',
module: 'crud',
description: '',
image: '',
}
]