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:
1 parent
fea48e1a3e
commit
72044476a8
184 files changed
+786
-664
No files matched your search
@@ -66,7 +66,7 @@ export class ClientDetailComponent implements OnInit, AfterViewInit {
|
||||
.subscribe(
|
||||
(result) => {
|
||||
this.toaster.show('Success', '');
|
||||
this.router.navigateByUrl('/Clients');
|
||||
this.router.navigateByUrl('/clients');
|
||||
},
|
||||
(error) => {
|
||||
this.toaster.show('Danger', error.error);
|
||||
@@ -79,7 +79,7 @@ export class ClientDetailComponent implements OnInit, AfterViewInit {
|
||||
.subscribe(
|
||||
(result) => {
|
||||
this.toaster.show('Success', '');
|
||||
this.router.navigateByUrl('/Clients');
|
||||
this.router.navigateByUrl('/clients');
|
||||
},
|
||||
(error) => {
|
||||
this.toaster.show('Danger', error.error);
|
||||
|
||||
@@ -14,7 +14,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]="['/Client', row.id]">{{row.name}}</a></mat-cell>
|
||||
<mat-cell *matCellDef="let row"><a [routerLink]="['/clients', row.id]">{{row.name}}</a></mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Enabled Column -->
|
||||
|
||||
@@ -9,7 +9,7 @@ import {AuthGuard} from '../auth/auth-guard.service';
|
||||
|
||||
const clientRoutes: Routes = [
|
||||
{
|
||||
path: 'Clients',
|
||||
path: '',
|
||||
component: ClientListComponent,
|
||||
canActivate: [AuthGuard],
|
||||
data: {
|
||||
@@ -20,7 +20,7 @@ const clientRoutes: Routes = [
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'Client/:id',
|
||||
path: ':id',
|
||||
component: ClientDetailComponent,
|
||||
canActivate: [AuthGuard],
|
||||
data: {
|
||||
|
||||
@@ -8,7 +8,7 @@ import {Client} from './client';
|
||||
const httpOptions = {
|
||||
headers: new HttpHeaders({'Content-Type': 'application/json'})
|
||||
};
|
||||
const url = '/api/Client';
|
||||
const url = '/api/clients';
|
||||
const serviceName = 'ClientService';
|
||||
|
||||
@Injectable({
|
||||
|
||||
Reference in new issue
Block a user