Feature: Lazy loading

Lazy loaded everything
TODO: The cash flow module when clicking on sub-links, it reloads the whole page, it needs to be diagnosed and fixed, this problem also exists in the other modules
TODO: Rename folders and modules such as account to accounts to match the url
This commit is contained in:
Amritanshu committed 2019-06-13 16:36:43 +05:30
1 parent fea48e1a3e
commit 72044476a8
184 files changed
+786 -664

No files matched your search

@@ -5,10 +5,10 @@ import { MatDialog } from '@angular/material/dialog';
import {ActivatedRoute, Router} from '@angular/router';
import {BehaviorSubject, fromEvent, Observable, of as observableOf, zip} from 'rxjs';
import {JournalDataSource} from './journal-datasource';
import {Account} from '../account/account';
import {VoucherService} from './voucher.service';
import {AccountService} from '../account/account.service';
import {DbFile, Journal, Voucher} from './voucher';
import {Account} from '../core/account';
import {VoucherService} from '../core/voucher.service';
import {AccountService} from '../core/account.service';
import {DbFile, Journal, Voucher} from '../core/voucher';
import * as moment from 'moment';
import * as math from 'mathjs';
import {AuthService} from '../auth/auth.service';
@@ -229,7 +229,7 @@ export class JournalComponent implements OnInit, AfterViewInit, OnDestroy {
(result) => {
this.loadVoucher(result);
this.toaster.show('Success', '');
this.router.navigate(['/Journal', result.id]);
this.router.navigate(['/journal', result.id]);
},
(error) => {
this.toaster.show('Danger', error.error);
@@ -249,7 +249,7 @@ export class JournalComponent implements OnInit, AfterViewInit, OnDestroy {
.subscribe(
(result) => {
this.toaster.show('Success', '');
this.router.navigate(['/Journal'], {replaceUrl: true});
this.router.navigate(['/journal'], {replaceUrl: true});
},
(error) => {
this.toaster.show('Danger', error.error);