정답: Angular 2의 생년월일 연령을 타자 스크립트로 계산하는 방법

1878 단어

answer re: How do I calculate age from birth date in Angular 2 using TypeScript
2017년 1월 22일.
4
<div class="row"&gt
    <div class="input-field col m2">
        <input type="date" [(ngModel)]="birthdate" id="txtdate">
    </div>
    <div class="input-field col m4">
        <input type="number" [(ngModel)]="age" id="age">
    </div>
    <button (click)="CalculateAge()">Calculate Age</button>
</div>
구성 요소
 import { Component, OnInit } from '@angular/core';
@Component( {
 selector: 'stud',
 templateUrl: './student.component.html'
 })
 export class StudentComponent implements OnInit
{
    public birthdate:

Open Full Answer

좋은 웹페이지 즐겨찾기