Skip to content

Commit

Permalink
login and register components added
Browse files Browse the repository at this point in the history
  • Loading branch information
pl-jay committed Apr 10, 2020
1 parent bc36f50 commit 9e36647
Show file tree
Hide file tree
Showing 7 changed files with 448 additions and 407 deletions.
831 changes: 433 additions & 398 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
"zone.js": "~0.10.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.1000.0-next.0",
"@angular/cli": "~10.0.0-next.0",
"@angular-devkit/build-angular": " 0.901.1",
"@angular/cli": "9.1.1",
"@angular/compiler-cli": "~9.1.1",
"@angular/language-service": "~9.1.1",
"@types/jasmine": "~3.3.8",
Expand Down
6 changes: 3 additions & 3 deletions src/app/_components/login/login.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@

<code>observable|async</code>: Time: {{ time | async }}

<code>observable|async</code>: Time: {{ times | async }}


<div *ngIf="usersRole | async">
<div *ngIf="usersRole$ | async">
this is rediculous user role 1
</div>

<div *ngIf="usersRole$ | async">
this is rediculous user role 2
</div>
{{ usersRole$.source._value }}
{{ usersRole$.source }}

</div>
4 changes: 4 additions & 0 deletions src/app/_components/navbar/navbar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,8 @@ export class NavbarComponent implements OnInit {
ngOnInit() {
}

logout(){

}

}
2 changes: 1 addition & 1 deletion src/app/_components/register/register.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

<mat-form-field class="example-full-width">
<mat-label>Choose a role...</mat-label>
<mat-select [(value)]="selected">
<mat-select>
<mat-option [value]="roles" *ngFor="let roles of Roles">{{roles}}
</mat-option>
</mat-select>
Expand Down
6 changes: 4 additions & 2 deletions src/app/_components/register/register.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ import { first } from 'rxjs/operators';
styleUrls: ['./register.component.css']
})
export class RegisterComponent implements OnInit {
ngOnInit(): void {
throw new Error("Method not implemented.");
Roles: any = ['Admin', 'Author', 'Reader'];

ngOnInit() {

}

}
2 changes: 1 addition & 1 deletion src/app/_helpers/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export class AuthService {

public authenticationState = new BehaviorSubject(false)

public userRole: BehaviorSubject<any>
public userRole: BehaviorSubject<string>

public currentUserToken: BehaviorSubject<any>

Expand Down

0 comments on commit 9e36647

Please sign in to comment.