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:
@ -7,7 +7,7 @@ import {LedgerComponent} from './ledger.component';
|
||||
|
||||
const ledgerRoutes: Routes = [
|
||||
{
|
||||
path: 'Ledger',
|
||||
path: '',
|
||||
component: LedgerComponent,
|
||||
canActivate: [AuthGuard],
|
||||
data: {
|
||||
@ -19,7 +19,7 @@ const ledgerRoutes: Routes = [
|
||||
runGuardsAndResolvers: 'always'
|
||||
},
|
||||
{
|
||||
path: 'Ledger/:id',
|
||||
path: ':id',
|
||||
component: LedgerComponent,
|
||||
canActivate: [AuthGuard],
|
||||
data: {
|
||||
|
||||
@ -9,9 +9,9 @@ import {debounceTime, distinctUntilChanged, map, startWith, switchMap} from 'rxj
|
||||
import * as moment from 'moment';
|
||||
import {LedgerDataSource} from './ledger-datasource';
|
||||
import {Ledger} from './ledger';
|
||||
import {Account} from '../account/account';
|
||||
import {Account} from '../core/account';
|
||||
import {LedgerService} from './ledger.service';
|
||||
import {AccountService} from '../account/account.service';
|
||||
import {AccountService} from '../core/account.service';
|
||||
import {ToCsvService} from '../shared/to-csv.service';
|
||||
|
||||
@Component({
|
||||
@ -117,7 +117,7 @@ export class LedgerComponent implements OnInit, AfterViewInit {
|
||||
|
||||
show() {
|
||||
const info = this.getInfo();
|
||||
this.router.navigate(['Ledger', info.account.id], {
|
||||
this.router.navigate(['ledger', info.account.id], {
|
||||
queryParams: {
|
||||
startDate: info.startDate,
|
||||
finishDate: info.finishDate
|
||||
|
||||
@ -9,7 +9,7 @@ const httpOptions = {
|
||||
headers: new HttpHeaders({'Content-Type': 'application/json'})
|
||||
};
|
||||
|
||||
const url = '/api/Ledger';
|
||||
const url = '/api/ledger';
|
||||
const serviceName = 'LedgerService';
|
||||
|
||||
@Injectable({
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import {Account} from '../account/account';
|
||||
import {Account} from '../core/account';
|
||||
|
||||
export class LedgerItem {
|
||||
date: string;
|
||||
|
||||
Reference in New Issue
Block a user