Http link .post error

http post error and i didn’t get where the code went wrong
this is in component.ts

  login(username: string, password: string) {
    // tslint:disable-next-line:max-line-length
    return<{access_token: string}>('', {username, password}).pipe(tap(res => {
    localStorage.setItem('<acess token>', res.access_token);
<form name="form" (ngSubmit)="f.form.valid && loginProcess()" #f="ngForm" novalidate>
  <div class="form-group" [ngClass]="{ 'has-error': f.submitted && !username.valid }">
      <label for="username">Username</label>
      <input type="text" class="form-control" name="username" [(ngModel)]="model.username" #username="ngModel" required />
      <div *ngIf="f.submitted && !username.valid" class="help-block">Username is required</div>
  <div class="form-group" [ngClass]="{ 'has-error': f.submitted && !password.valid }">
      <label for="password">Password</label>
      <input type="password" class="form-control" name="password" [(ngModel)]="model.password" #password="ngModel" required />
      <div *ngIf="f.submitted && !password.valid" class="help-block">Password is required</div>
  <div class="form-group">
      <button class="btn btn-primary" (click)="getEmployee()">Login</button>

Can you post a github link to your angular project. Thank you

1 Like

sorry i didn’t check the message
here’s the github link