pb10001/utakata-umigame

View on GitHub
client-beta/src/app/config/config.component.ts

Summary

Maintainability
A
0 mins
Test Coverage
import { Component, OnInit } from '@angular/core';

import { UserService } from '../user.service';

@Component({
  providers: [UserService],
  selector: 'app-config',
  templateUrl: './config.component.html',
  styleUrls: ['./config.component.css']
})
export class ConfigComponent implements OnInit {
  name;
  removePass;
  room;
  constructor( private userService: UserService ) { }

  ngOnInit() {
    this.name = this.userService.getName();
    this.removePass = this.userService.getRemovePass();
    this.room = this.userService.getRoom();
  }

  setName () {
    this.userService.setName(this.name);
  }

  setRoom () {
    this.userService.setRoom(this.room);
  }

  setRemovePass () {
    this.userService.setRemovePass(this.removePass);
  }
}