Sha256: 237f1c1dd76d20645151b13e59aa5145fe80d6b7f4de6c7cdb78cbac7ec89dbc
Contents?: true
Size: 850 Bytes
Versions: 4
Compression:
Stored size: 850 Bytes
Contents
import { Component, OnInit } from '@angular/core'; import { RegistrationService } from './registration.service'; @Component({ selector: 'app-registration', templateUrl: './registration.component.html', styleUrls: ['./registration.component.css'] }) export class RegistrationComponent implements OnInit { user: any; errors = { name: [], email: [], password: [], password_confirmation: [] }; success = false; constructor(public service: RegistrationService) { this.user = { name: '', email: '', password: '', password_confirmation: '' }; } doSubmit () { this.service.registerAccount(this.user).subscribe( (res) => { this.success = true; }, (res) => { this.success = false; this.errors = res; } ); } ngOnInit() { } }
Version data entries
4 entries across 4 versions & 1 rubygems