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:
Amritanshu
2019-06-12 19:34:50 +05:30
parent fea48e1a3e
commit 72044476a8
184 changed files with 786 additions and 664 deletions

View File

@ -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: {

View File

@ -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'})

View File

@ -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() {

View File

@ -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'})