11import { Component , OnInit } from '@angular/core' ;
2+ import { Router } from '@angular/router' ;
23
34import { JwtService } from '../shared/services/jwt.service' ;
5+ import { StepService } from '../shared/services/step.service' ;
46
57@Component ( {
68 selector : 'app-anatomy' ,
@@ -22,7 +24,10 @@ export class AnatomyComponent implements OnInit {
2224 jwtSignatureShort : string ;
2325 token : string ;
2426
25- constructor ( private jwtService : JwtService ) {
27+ constructor ( private router : Router ,
28+ private jwtService : JwtService ,
29+ private stepService : StepService ) {
30+ this . stepService . setStep ( 2 ) ;
2631 this . showToken = false ;
2732 this . jwtHeader = '' ;
2833 this . jwtHeaderShort = '' ;
@@ -45,7 +50,6 @@ export class AnatomyComponent implements OnInit {
4550 this . jwtService . get ( )
4651 . subscribe ( {
4752 next : ( success : any ) => {
48- console . debug ( 'success:' , success ) ;
4953 if ( success && success . token ) {
5054 const tokenSplitted = success . token . split ( '.' ) ;
5155 this . jwtHeader = tokenSplitted [ 0 ] ;
@@ -63,4 +67,9 @@ export class AnatomyComponent implements OnInit {
6367 } ) ;
6468 }
6569
70+ public nextStep ( ) : void {
71+ this . stepService . setStep ( 3 ) ;
72+ this . router . navigate ( [ '/verify' ] ) ;
73+ }
74+
6675}
0 commit comments