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
2019-06-13 16:36:43 +05:30
parent fea48e1a3e
commit 72044476a8
184 changed files with 786 additions and 664 deletions
@@ -3,7 +3,7 @@ import { MatPaginator } from '@angular/material/paginator';
import { MatSort } from '@angular/material/sort';
import {map} from 'rxjs/operators';
import {merge, Observable, of as observableOf} from 'rxjs';
import {User} from '../user';
import {User} from '../../core/user';
export class UserListDataSource extends DataSource<User> {
@@ -1,7 +1,7 @@
<mat-card>
<mat-card-title-group>
<mat-card-title>Users</mat-card-title>
<a mat-button [routerLink]="['/User']">
<a mat-button [routerLink]="['/users', 'new']">
<mat-icon>add_box</mat-icon>
Add
</a>
@@ -12,7 +12,7 @@
<!-- Name Column -->
<ng-container matColumnDef="name">
<mat-header-cell *matHeaderCellDef mat-sort-header>Name</mat-header-cell>
<mat-cell *matCellDef="let row"><a [routerLink]="['/User', row.name]">{{row.name}}</a></mat-cell>
<mat-cell *matCellDef="let row"><a [routerLink]="['/users', row.name]">{{row.name}}</a></mat-cell>
</ng-container>
<!-- Locked Out Column -->
@@ -1,23 +0,0 @@
import {ComponentFixture, fakeAsync, TestBed} from '@angular/core/testing';
import {UserListComponent} from './user-list.component';
describe('UserListComponent', () => {
let component: UserListComponent;
let fixture: ComponentFixture<UserListComponent>;
beforeEach(fakeAsync(() => {
TestBed.configureTestingModule({
declarations: [UserListComponent]
})
.compileComponents();
fixture = TestBed.createComponent(UserListComponent);
component = fixture.componentInstance;
fixture.detectChanges();
}));
it('should compile', () => {
expect(component).toBeTruthy();
});
});
@@ -2,7 +2,7 @@ import {Component, OnInit, ViewChild} from '@angular/core';
import { MatPaginator } from '@angular/material/paginator';
import { MatSort } from '@angular/material/sort';
import {UserListDataSource} from './user-list-datasource';
import {User} from '../user';
import {User} from '../../core/user';
import {ActivatedRoute} from '@angular/router';
@Component({