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 {BalanceSheetComponent} from './balance-sheet.component';
|
||||
|
||||
const balanceSheetRoutes: Routes = [
|
||||
{
|
||||
path: 'BalanceSheet',
|
||||
path: '',
|
||||
component: BalanceSheetComponent,
|
||||
canActivate: [AuthGuard],
|
||||
data: {
|
||||
@ -18,7 +18,7 @@ const balanceSheetRoutes: Routes = [
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'BalanceSheet/:date',
|
||||
path: ':date',
|
||||
component: BalanceSheetComponent,
|
||||
canActivate: [AuthGuard],
|
||||
data: {
|
||||
|
||||
@ -44,7 +44,7 @@ export class BalanceSheetComponent implements OnInit {
|
||||
|
||||
show() {
|
||||
const info = this.getInfo();
|
||||
this.router.navigate(['BalanceSheet', info.date]);
|
||||
this.router.navigate(['balance-sheet', info.date]);
|
||||
}
|
||||
|
||||
getInfo(): BalanceSheet {
|
||||
|
||||
@ -9,8 +9,8 @@ const httpOptions = {
|
||||
headers: new HttpHeaders({'Content-Type': 'application/json'})
|
||||
};
|
||||
|
||||
const url = '/api/BalanceSheet';
|
||||
const serviceName = 'AccountService';
|
||||
const url = '/api/balance-sheet';
|
||||
const serviceName = 'BalanceSheetService';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
|
||||
Reference in New Issue
Block a user