-
-
Save gavilanch/7d540bdb26e5bcf1996ba970481c0385 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit } from '@angular/core'; | |
import { FormBuilder, FormGroup, Validators } from '@angular/forms'; | |
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; | |
@Component({ | |
selector: 'app-todo-form', | |
templateUrl: './todo-form.component.html', | |
styleUrls: ['./todo-form.component.css'] | |
}) | |
export class TodoFormComponent implements OnInit { | |
todoForm: FormGroup; | |
constructor(private formBuilder: FormBuilder, | |
public activeModal: NgbActiveModal) { } | |
ngOnInit() { | |
this.todoForm = this.formBuilder.group({ | |
title: ['', Validators.required], | |
description: ['', Validators.required], | |
done: false | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment