Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
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 ={
      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