-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve back button on course layout #74
Conversation
…tton-on-course-layout
@@ -40,7 +40,7 @@ | |||
</ul> | |||
} | |||
</div> | |||
<a class="btn btn-ghost text-xl" routerLink="/"> | |||
<a class="btn btn-ghost text-xl" href="{{link}}"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use routerLink
instead of href
, it's used for internal routing. Href
is normally used for routings outside of the website. https://angular.dev/guide/routing/router-reference#active-router-links
apps/course/src/app/app.component.ts
Outdated
@@ -48,3 +48,7 @@ export class AppComponent { | |||
}); | |||
} | |||
} | |||
|
|||
export const Link = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't this be moved in the navbar-course.component
itself, since it's only used in the course-layout
back button and not in the whole app?
@@ -40,7 +40,7 @@ | |||
</ul> | |||
} | |||
</div> | |||
<a class="btn btn-ghost text-xl" routerLink="/"> | |||
<a class="btn btn-ghost text-xl" routerLink="/../../../../../{{link}}"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Def not best practices
Types of changes
Checklist:
Description
Programmed the button to go to the previous page before a specific course. It goes back to either the Homepage or the Course page.