fixes #5507 this.vnConfig no tiene datos cargados al inicio de la aplicación #1565

Merged
alexandre merged 9 commits from 5507-loadConfigAtStart into dev 2023-06-07 06:30:10 +00:00
6 changed files with 7 additions and 6 deletions
Showing only changes of commit a7363ce2a4 - Show all commits

View File

@ -5,7 +5,6 @@ import './auth';
import './token';
import './modules';
import './interceptor';
import './config';
import './week-days';
import './report';
import './email';

View File

@ -20,8 +20,6 @@ class Controller {
name: config.languages[code] ? config.languages[code] : code
});
}
vnConfig.initialize();
}
set lang(value) {

View File

@ -3,3 +3,4 @@ import './routes';
import './components';
import './styles';
import 'vn-loopback/server/boot/date';
import './services';

View File

@ -1,8 +1,8 @@
import ngModule from './module';
import getMainRoute from 'core/lib/get-main-route';
config.$inject = ['$stateProvider', '$urlRouterProvider', 'vnConfig'];
function config($stateProvider, $urlRouterProvider, vnConfig) {
config.$inject = ['$stateProvider', '$urlRouterProvider'];
function config($stateProvider, $urlRouterProvider) {
$urlRouterProvider
.otherwise('/');
@ -10,7 +10,9 @@ function config($stateProvider, $urlRouterProvider, vnConfig) {
.state('layout', {
abstract: true,
template: '<vn-layout></vn-layout>',
resolve: () => vnConfig.initialize()
resolve: {
config: ['vnConfig', vnConfig => vnConfig.initialize()]
}
})
.state('outLayout', {
abstract: true,

View File

@ -0,0 +1 @@
import './config';