Skip to content
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

Closed
wants to merge 7 commits into from

Conversation

valeriaxxx
Copy link
Contributor

@valeriaxxx valeriaxxx commented Mar 7, 2024

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING and other relevant documents.

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.

  • Package: course

@valeriaxxx valeriaxxx linked an issue Mar 7, 2024 that may be closed by this pull request
@valeriaxxx valeriaxxx marked this pull request as ready for review March 7, 2024 08:38
@valeriaxxx valeriaxxx added enhancement New feature or request good first issue Good for newcomers area: course Issue regarding the main package labels Mar 7, 2024
@danieljancar danieljancar removed the good first issue Good for newcomers label Mar 7, 2024
@@ -40,7 +40,7 @@
</ul>
}
</div>
<a class="btn btn-ghost text-xl" routerLink="/">
<a class="btn btn-ghost text-xl" href="{{link}}">
Copy link
Owner

@danieljancar danieljancar Mar 7, 2024

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

@@ -48,3 +48,7 @@ export class AppComponent {
});
}
}

export const Link = {
Copy link
Owner

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}}">
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Def not best practices

@danieljancar danieljancar removed the request for review from KunzRobert March 14, 2024 08:59
@danieljancar danieljancar deleted the 50-improve-back-button-on-course-layout branch June 19, 2024 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: course Issue regarding the main package enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Improve back button on course layout
2 participants