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:
@@ -5,10 +5,10 @@ import { MatDialog } from '@angular/material/dialog';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {BehaviorSubject, fromEvent, Observable, of, of as observableOf, zip} from 'rxjs';
|
||||
import {PaymentDataSource} from './payment-datasource';
|
||||
import {Account} from '../account/account';
|
||||
import {VoucherService} from '../journal/voucher.service';
|
||||
import {AccountService} from '../account/account.service';
|
||||
import {DbFile, Journal, Voucher} from '../journal/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';
|
||||
@@ -233,7 +233,7 @@ export class PaymentComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||
(result) => {
|
||||
this.loadVoucher(result);
|
||||
this.toaster.show('Success', '');
|
||||
this.router.navigate(['/Payment', result.id]);
|
||||
this.router.navigate(['/payment', result.id]);
|
||||
},
|
||||
(error) => {
|
||||
this.toaster.show('Danger', error.error);
|
||||
@@ -254,7 +254,7 @@ export class PaymentComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||
.subscribe(
|
||||
(result) => {
|
||||
this.toaster.show('Success', '');
|
||||
this.router.navigate(['/Payment'], {replaceUrl: true});
|
||||
this.router.navigate(['/payment'], {replaceUrl: true});
|
||||
},
|
||||
(error) => {
|
||||
this.toaster.show('Danger', error.error);
|
||||
|
||||
Reference in New Issue
Block a user