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