|
|
@ -6,29 +6,29 @@ import {Registration} from '../../models/registration';
|
|
|
|
selector: 'registration',
|
|
|
|
selector: 'registration',
|
|
|
|
templateUrl: './register.component.html',
|
|
|
|
templateUrl: './register.component.html',
|
|
|
|
styleUrls: ['./register.component.sass']
|
|
|
|
styleUrls: ['./register.component.sass']
|
|
|
|
})/*
|
|
|
|
})
|
|
|
|
export class RegisterComponent implements OnInit {
|
|
|
|
export class RegisterComponent implements OnInit {
|
|
|
|
registration: Registration
|
|
|
|
registration: Registration
|
|
|
|
|
|
|
|
|
|
|
|
constructor(private registerService: RegisterService) {}
|
|
|
|
constructor(private registerService: RegisterService) {
|
|
|
|
|
|
|
|
this.registration = {username: null, passwordHash: null, email: null};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onClickSubmit(pUsername: string, pEmail: string, pPasswordHash: string,pPasswordHashRepeat: string ) {
|
|
|
|
|
|
|
|
console.log('username: ' + pUsername);
|
|
|
|
|
|
|
|
console.log('email: ' + pEmail);
|
|
|
|
|
|
|
|
|
|
|
|
onClickSubmit(pUsername: string, pEmail: string, pPasswordHash: string) {
|
|
|
|
if(pPasswordHash == pPasswordHashRepeat){
|
|
|
|
|
|
|
|
console.log('password same');
|
|
|
|
this.registration.username = pUsername
|
|
|
|
this.registration.username = pUsername
|
|
|
|
this.registration.email = pEmail
|
|
|
|
this.registration.email = pEmail
|
|
|
|
this.registration.passwordHash = pPasswordHash
|
|
|
|
this.registration.passwordHash = pPasswordHash
|
|
|
|
|
|
|
|
|
|
|
|
this.registerService.register(this.registration)
|
|
|
|
this.registerService.register(this.registration)
|
|
|
|
|
|
|
|
} else{console.log('password NOT same'); }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ngOnInit() {}
|
|
|
|
ngOnInit() {}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
|
|
|
|
export class RegisterComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
constructor() { }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ngOnInit() {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|