Permalink
Browse files

Step 5.7: Create form model

  • Loading branch information...
1 parent 3071290 commit 54f33228b7f23337cf893cb699829138e1d57da5 @kamilkisiela kamilkisiela committed with DAB0mB Sep 21, 2016
Showing with 17 additions and 2 deletions.
  1. +17 −2 client/imports/app/parties/parties-form.component.ts
@@ -1,9 +1,24 @@
-import { Component } from '@angular/core';
+import { Component, OnInit } from '@angular/core';
+import { FormGroup, FormBuilder } from '@angular/forms';
import template from './parties-form.component.html';
@Component({
selector: 'parties-form',
template
})
-export class PartiesFormComponent {}
+export class PartiesFormComponent implements OnInit {
+ addForm: FormGroup;
+
+ constructor(
+ private formBuilder: FormBuilder
+ ) {}
+
+ ngOnInit() {
+ this.addForm = this.formBuilder.group({
+ name: [],
+ description: [],
+ location: []
+ });
+ }
+}

0 comments on commit 54f3322

Please sign in to comment.