File

src/modules/lesson/detail/detail.component.ts

Metadata

selector app-detail
styleUrls detail.component.scss
templateUrl detail.component.html

Constructor

constructor(dataService: DataServiceService)

Properties

formData
formData: { name: string; weight: string; height: string; gender: string; }
import { Component, NgModule } from '@angular/core';
import { DataServiceService } from './data-service.service';

@Component({
  selector: 'app-detail',
  templateUrl: './detail.component.html',
  styleUrls: ['./detail.component.scss']
}

)

export class DetailComponent {


  formData = {
    name: '',
    weight: '',
    height: '',
    gender: ''
  };

  constructor(private dataService: DataServiceService) { }

  ngOnInit() {
    const formData = localStorage.getItem('formData');
    if (formData) {
      this.formData = JSON.parse(formData);
    }
  }

}

results matching ""

    No results matching ""