Task 7#5
Open
YurikMurik wants to merge 1 commit intotask-5from
Open
Conversation
Owner
YurikMurik
commented
May 14, 2020
- Implements necessary routes, redirect, authguard
- Added 404page component, breadcrumbs component
- Added edit component and logic for it
- Added another logic for components in according to requirements
- Added pipe for transforming breadcrumb srting
| </mat-card-header> | ||
| <mat-card-content> | ||
| <form class="add-course-form"> | ||
| <table class="add-course-form-full-width" cellspacing="0"> |
There was a problem hiding this comment.
please do not use the table for layout, it's 2020, choose different approach
Owner
Author
There was a problem hiding this comment.
okay, I changed this one
| private homePageService: HomePageService | ||
| ) { } | ||
|
|
||
| public cancelIsClicked(): void { |
There was a problem hiding this comment.
name of the method, please consider changing
| }]; | ||
|
|
||
| this.homePageService.createCourse(sentDataCourse); | ||
| this.router.navigate(['/courses']); |
There was a problem hiding this comment.
can you assign value ['/courses'] to a variable?
| import { switchMap } from 'rxjs/operators'; | ||
| import { Observable } from 'rxjs'; | ||
| import { Router } from '@angular/router'; | ||
|
|
There was a problem hiding this comment.
please delete unused imports
| public loginUser(): void { | ||
| const isLogged: boolean = this.authService.userLogin(this.username, this.password); | ||
| this.isAuthentificated = isLogged; | ||
| if (isLogged) { |
There was a problem hiding this comment.
this check should be performed by a guard
| ) { } | ||
|
|
||
| public ngOnInit(): void { | ||
| this.isAuthentificated = this.authService.isAuthentificated(); |
There was a problem hiding this comment.
Why is this here?
if we are on the login page, shouldn't we be logged out by default?
Owner
Author
There was a problem hiding this comment.
yes, sure. You're right, this piece of code is not important. I deleted it
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.