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 {CashFlowComponent} from './cash-flow.component';
|
||||
|
||||
const cashFlowRoutes: Routes = [
|
||||
{
|
||||
path: 'CashFlow',
|
||||
path: '',
|
||||
component: CashFlowComponent,
|
||||
canActivate: [AuthGuard],
|
||||
data: {
|
||||
@ -19,7 +19,7 @@ const cashFlowRoutes: Routes = [
|
||||
runGuardsAndResolvers: 'always'
|
||||
},
|
||||
{
|
||||
path: 'CashFlow/:id',
|
||||
path: ':id',
|
||||
component: CashFlowComponent,
|
||||
canActivate: [AuthGuard],
|
||||
data: {
|
||||
|
||||
@ -4,7 +4,6 @@ import {CashFlow} from './cash-flow';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import * as moment from 'moment';
|
||||
import {FormBuilder, FormGroup} from '@angular/forms';
|
||||
import {Ledger} from '../ledger/ledger';
|
||||
|
||||
@Component({
|
||||
selector: 'app-cash-flow',
|
||||
@ -43,7 +42,7 @@ export class CashFlowComponent implements OnInit {
|
||||
|
||||
show() {
|
||||
const info = this.getInfo();
|
||||
this.router.navigate(['CashFlow'], {
|
||||
this.router.navigate(['cash-flow'], {
|
||||
queryParams: {
|
||||
startDate: info.startDate,
|
||||
finishDate: info.finishDate
|
||||
|
||||
@ -9,8 +9,8 @@ const httpOptions = {
|
||||
headers: new HttpHeaders({'Content-Type': 'application/json'})
|
||||
};
|
||||
|
||||
const url = '/api/CashFlow';
|
||||
const serviceName = 'AccountService';
|
||||
const url = '/api/cash-flow';
|
||||
const serviceName = 'CashFlowService';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
|
||||
Reference in New Issue
Block a user