Skip to content

Commit 42731f0

Browse files
committed
Fix Auto routing.
Fix new-collaborators-link.
1 parent c29665d commit 42731f0

4 files changed

Lines changed: 19 additions & 7 deletions

File tree

src/app/root/root-routing.module.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,25 @@ import {RouterModule, Routes} from "@angular/router";
44
import * as fromContainers from "./containers";
55

66
const routes: Routes = [
7+
{
8+
path: "",
9+
redirectTo: "docs",
10+
pathMatch: "full"
11+
},
712
{
813
path: "docs",
914
component: fromContainers.LayoutComponent,
1015
children: [
16+
{
17+
path: "",
18+
pathMatch: "full",
19+
redirectTo: "v1.0.0"
20+
},
1121
{
1222
path: "v1.0.0",
1323
loadChildren: () => import("../version1.0.0").then(m => m.Version100Module)
1424
}
1525
]
16-
},
17-
{
18-
path: "",
19-
redirectTo: "docs/v1.0.0/getting-started",
20-
pathMatch: "full"
2126
}
2227
];
2328

src/app/version1.0.0/components/development/collaborators/collaborators.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ <h5 class="card-title">Fawzy Mokhtar</h5>
2121
</div>
2222

2323
<div class="card">
24-
<a href="https://github.com/fawzymokhtar" target="blank" class="card-link">
24+
<a href="{{settings.gitHubRepo}}" target="blank" class="card-link">
2525
<img src="assets/imgs/collaborators/new-collaborator.png" class="card-img-top"
2626
alt="New Collaborator">
2727
</a>
@@ -30,7 +30,7 @@ <h5 class="card-title">You!</h5>
3030
<p class="card-text">Join us!.</p>
3131
</div>
3232
<div class="card-body">
33-
<a href="https://github.com/fawzymokhtar" target="blank" class="card-link">Become a collaborator</a>
33+
<a href="{{settings.gitHubRepo}}" target="blank" class="card-link">Become a collaborator</a>
3434
</div>
3535
</div>
3636
</div>

src/app/version1.0.0/components/development/collaborators/collaborators.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import {Component, OnInit} from "@angular/core";
22
import {IPost, DocService} from "../../../../shared";
3+
import {environment} from "../../../../../environments/environment";
34

45
@Component({
56
selector: "app-collaborators",
@@ -14,6 +15,7 @@ export class CollaboratorsComponent implements OnInit {
1415
post: IPost;
1516
previous: IPost;
1617
next: IPost;
18+
settings = environment;
1719

1820
ngOnInit(): void {
1921
this.post = DocService.findPost(this.versionId, this.postId);

src/app/version1.0.0/version1.0.0-routing.module.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ const routes: Routes = [
1010
component: fromContainers.MainComponent,
1111
children: [
1212

13+
{
14+
path: "",
15+
pathMatch: "full",
16+
redirectTo: "getting-started"
17+
},
1318
{
1419
path: "getting-started",
1520
component: fromComponents.GettingStartedComponent

0 commit comments

Comments
 (0)