Commit 9295c144 authored by dev0tion's avatar dev0tion

Add back button, rename functions

parent ffc33805
...@@ -5,5 +5,6 @@ ...@@ -5,5 +5,6 @@
<p> <p>
Users who have previously used Breeze, can choose to recover their wallet. Users who have previously used Breeze, can choose to recover their wallet.
</p> </p>
<button (click)="createWallet()">Create</button> <button (click)="onCreateClicked()">Create</button>
<button (click)="recoverWallet()">Recover</button> <button (click)="onRecoverClicked()">Recover</button>
\ No newline at end of file <button (click)="onBackClicked()">Back</button>
import { Component } from '@angular/core'; import { Component } from '@angular/core';
import {Location} from '@angular/common';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
@Component({ @Component({
...@@ -7,12 +8,16 @@ import { Router } from '@angular/router'; ...@@ -7,12 +8,16 @@ import { Router } from '@angular/router';
styleUrls: ['./setup.component.css'], styleUrls: ['./setup.component.css'],
}) })
export class SetupComponent { export class SetupComponent {
constructor(private router: Router) {} constructor(private router: Router, private location: Location) {}
private createWallet() { private onCreateClicked() {
this.router.navigate(['/setup/create']) this.router.navigate(['/setup/create']);
} }
private recoverWallet() { private onRecoverClicked() {
this.router.navigate(['/setup/recover']) this.router.navigate(['/setup/recover']);
}
private onBackClicked() {
this.location.back();
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment