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:
@ -8,7 +8,7 @@ import {AttendanceTypeResolver} from './attendance-type-resolver.service';
|
||||
|
||||
const attendanceRoutes: Routes = [
|
||||
{
|
||||
path: 'Attendance',
|
||||
path: '',
|
||||
component: AttendanceComponent,
|
||||
canActivate: [AuthGuard],
|
||||
data: {
|
||||
@ -21,7 +21,7 @@ const attendanceRoutes: Routes = [
|
||||
runGuardsAndResolvers: 'always'
|
||||
},
|
||||
{
|
||||
path: 'Attendance/:date',
|
||||
path: ':date',
|
||||
component: AttendanceComponent,
|
||||
canActivate: [AuthGuard],
|
||||
data: {
|
||||
|
||||
@ -5,7 +5,7 @@ import {HttpClient} from '@angular/common/http';
|
||||
import {ErrorLoggerService} from '../core/error-logger.service';
|
||||
import {AttendanceType} from './attendance-type';
|
||||
|
||||
const url = '/api/AttendanceTypes';
|
||||
const url = '/api/attendance-types';
|
||||
const serviceName = 'AttendanceTypeService';
|
||||
|
||||
@Injectable({providedIn: 'root'})
|
||||
|
||||
@ -72,7 +72,7 @@ export class AttendanceComponent implements OnInit {
|
||||
|
||||
show() {
|
||||
const date = moment(this.form.value.date).format('DD-MMM-YYYY');
|
||||
this.router.navigate(['/Attendance', date]);
|
||||
this.router.navigate(['/attendance', date]);
|
||||
}
|
||||
|
||||
save() {
|
||||
|
||||
@ -9,7 +9,7 @@ const httpOptions = {
|
||||
headers: new HttpHeaders({'Content-Type': 'application/json'})
|
||||
};
|
||||
|
||||
const url = '/api/Attendance';
|
||||
const url = '/api/attendance';
|
||||
const serviceName = 'AttendanceService';
|
||||
|
||||
@Injectable({providedIn: 'root'})
|
||||
|
||||
Reference in New Issue
Block a user