diff options
Diffstat (limited to 'ufund-ui/src/app/components')
3 files changed, 9 insertions, 3 deletions
diff --git a/ufund-ui/src/app/components/dashboard/dashboard.component.html b/ufund-ui/src/app/components/dashboard/dashboard.component.html index 9c5fce9..f41ccef 100644 --- a/ufund-ui/src/app/components/dashboard/dashboard.component.html +++ b/ufund-ui/src/app/components/dashboard/dashboard.component.html @@ -1 +1,3 @@  <p>dashboard works!</p> +<a routerLink="/cupboard">Go to the Cupboard</a> +<a routerLink="/basket">Go to my basket</a> diff --git a/ufund-ui/src/app/components/dashboard/dashboard.component.ts b/ufund-ui/src/app/components/dashboard/dashboard.component.ts index 6da4013..dd323c4 100644 --- a/ufund-ui/src/app/components/dashboard/dashboard.component.ts +++ b/ufund-ui/src/app/components/dashboard/dashboard.component.ts @@ -7,5 +7,5 @@ import { Component } from '@angular/core';    styleUrl: './dashboard.component.css'  })  export class DashboardComponent { - +    constructor() {}  } diff --git a/ufund-ui/src/app/components/login/login.component.ts b/ufund-ui/src/app/components/login/login.component.ts index 9a4eb0f..50dd018 100644 --- a/ufund-ui/src/app/components/login/login.component.ts +++ b/ufund-ui/src/app/components/login/login.component.ts @@ -1,5 +1,6 @@  import { Component } from '@angular/core'  import {UsersService} from '../../services/users.service'; +import {Router} from '@angular/router';  @Component({    selector: 'app-login', @@ -9,7 +10,8 @@ import {UsersService} from '../../services/users.service';  })  export class LoginComponent {      constructor( -        protected usersService: UsersService +        protected usersService: UsersService, +        private router: Router      ) {}      login(username: string | null, password: string | null) { @@ -18,6 +20,8 @@ export class LoginComponent {              return;          } -        this.usersService.login(username, password) +        this.usersService.login(username, password).then(() => { +            this.router.navigate(['/dashboard']); +        })      }  }  | 
