diff --git a/src/app/app.module.ts b/src/app/app.module.ts
index e38010f2..0def001a 100644
--- a/src/app/app.module.ts
+++ b/src/app/app.module.ts
@@ -15,8 +15,7 @@ import { appRoutes } from 'app/app.routing';
const routerConfig: ExtraOptions = {
scrollPositionRestoration: 'enabled',
- preloadingStrategy : PreloadAllModules,
- relativeLinkResolution : 'legacy'
+ preloadingStrategy : PreloadAllModules
};
@NgModule({
diff --git a/src/app/modules/admin/apps/contacts/details/details.component.ts b/src/app/modules/admin/apps/contacts/details/details.component.ts
index 56c3c49b..097b2d59 100644
--- a/src/app/modules/admin/apps/contacts/details/details.component.ts
+++ b/src/app/modules/admin/apps/contacts/details/details.component.ts
@@ -298,22 +298,15 @@ export class ContactsDetailsComponent implements OnInit, OnDestroy
return;
}
- // Get the current activated route
- let route = this._activatedRoute;
- while ( route.firstChild )
- {
- route = route.firstChild;
- }
-
// Navigate to the next contact if available
if ( nextContactId )
{
- this._router.navigate(['../', nextContactId], {relativeTo: route});
+ this._router.navigate(['../', nextContactId], {relativeTo: this._activatedRoute});
}
// Otherwise, navigate to the parent
else
{
- this._router.navigate(['../'], {relativeTo: route});
+ this._router.navigate(['../'], {relativeTo: this._activatedRoute});
}
// Toggle the edit mode off
diff --git a/src/app/modules/admin/apps/contacts/list/list.component.html b/src/app/modules/admin/apps/contacts/list/list.component.html
index 50c75023..ee6027f9 100644
--- a/src/app/modules/admin/apps/contacts/list/list.component.html
+++ b/src/app/modules/admin/apps/contacts/list/list.component.html
@@ -78,11 +78,11 @@
-
+ [routerLink]="['./', contact.id]">
{{contact.name}}
{{contact.title}}
-
+
diff --git a/src/app/modules/admin/apps/contacts/list/list.component.ts b/src/app/modules/admin/apps/contacts/list/list.component.ts
index a1ac2df4..78efe4b1 100644
--- a/src/app/modules/admin/apps/contacts/list/list.component.ts
+++ b/src/app/modules/admin/apps/contacts/list/list.component.ts
@@ -160,41 +160,13 @@ export class ContactsListComponent implements OnInit, OnDestroy
// @ Public methods
// -----------------------------------------------------------------------------------------------------
- /**
- * Go to contact
- *
- * @param id
- */
- goToContact(id: string): void
- {
- // Get the current activated route
- let route = this._activatedRoute;
- while ( route.firstChild )
- {
- route = route.firstChild;
- }
-
- // Go to contact
- this._router.navigate(['../', id], {relativeTo: route});
-
- // Mark for check
- this._changeDetectorRef.markForCheck();
- }
-
/**
* On backdrop clicked
*/
onBackdropClicked(): void
{
- // Get the current activated route
- let route = this._activatedRoute;
- while ( route.firstChild )
- {
- route = route.firstChild;
- }
-
- // Go to the parent route
- this._router.navigate(['../'], {relativeTo: route});
+ // Go back to the list
+ this._router.navigate(['./'], {relativeTo: this._activatedRoute});
// Mark for check
this._changeDetectorRef.markForCheck();
@@ -208,26 +180,14 @@ export class ContactsListComponent implements OnInit, OnDestroy
// Create the contact
this._contactsService.createContact().subscribe((newContact) => {
- // Go to new contact
- this.goToContact(newContact.id);
+ // Go to the new contact
+ this._router.navigate(['./', newContact.id], {relativeTo: this._activatedRoute});
+
+ // Mark for check
+ this._changeDetectorRef.markForCheck();
});
}
- /**
- * Get country code
- *
- * @param iso
- */
- getCountryCode(iso: string): string
- {
- if ( !iso )
- {
- return '';
- }
-
- return this.countries.find((country) => country.iso === iso).code;
- }
-
/**
* Track by function for ngFor loops
*
diff --git a/src/app/modules/admin/apps/file-manager/list/list.component.html b/src/app/modules/admin/apps/file-manager/list/list.component.html
index 3a4fa299..e2175e8e 100644
--- a/src/app/modules/admin/apps/file-manager/list/list.component.html
+++ b/src/app/modules/admin/apps/file-manager/list/list.component.html
@@ -68,9 +68,9 @@
-
+ [routerLink]="['./', item.id]">
@@ -109,7 +109,7 @@
{{item.contents}}
-
+
diff --git a/src/app/modules/admin/apps/file-manager/list/list.component.ts b/src/app/modules/admin/apps/file-manager/list/list.component.ts
index 5d0dc2c6..c086e3b0 100644
--- a/src/app/modules/admin/apps/file-manager/list/list.component.ts
+++ b/src/app/modules/admin/apps/file-manager/list/list.component.ts
@@ -90,41 +90,13 @@ export class FileManagerListComponent implements OnInit, OnDestroy
// @ Public methods
// -----------------------------------------------------------------------------------------------------
- /**
- * Go to item
- *
- * @param id
- */
- goToItem(id: string): void
- {
- // Get the current activated route
- let route = this._activatedRoute;
- while ( route.firstChild )
- {
- route = route.firstChild;
- }
-
- // Go to item
- this._router.navigate(['../', id], {relativeTo: route});
-
- // Mark for check
- this._changeDetectorRef.markForCheck();
- }
-
/**
* On backdrop clicked
*/
onBackdropClicked(): void
{
- // Get the current activated route
- let route = this._activatedRoute;
- while ( route.firstChild )
- {
- route = route.firstChild;
- }
-
- // Go back to the parent route
- this._router.navigate(['../'], {relativeTo: route});
+ // Go back to the list
+ this._router.navigate(['./'], {relativeTo: this._activatedRoute});
// Mark for check
this._changeDetectorRef.markForCheck();
diff --git a/src/app/modules/admin/apps/help-center/faqs/faqs.component.html b/src/app/modules/admin/apps/help-center/faqs/faqs.component.html
index 32329e78..0279228e 100644
--- a/src/app/modules/admin/apps/help-center/faqs/faqs.component.html
+++ b/src/app/modules/admin/apps/help-center/faqs/faqs.component.html
@@ -4,13 +4,13 @@
-
+