Angular2 (ngSubmit) not working
<p>I've just started Angular2 and facing following error when add <strong>(ngSubmit)</strong> attribute to my form</p>

<pre><code>Template parse errors:
There is no directive with "exportAs" set to "ngForm" ("


    &lt;form [ERROR -&gt;]#form="ngForm" (ngSubmit)="onSubmit()" novalidate&gt;
</code></pre>

<p>Following are some of my dependencies from package.json.</p>

<pre><code>"dependencies": {
    "@angular/common": "2.0.0",
    "@angular/compiler": "2.0.0",
    "@angular/core": "2.0.0",
    "@angular/forms": "2.0.0",
    "@angular/http": "2.0.0",
    "@angular/platform-browser": "2.0.0",
    "@angular/platform-browser-dynamic": "2.0.0",
    "@angular/router": "3.0.0",
    "@angular/upgrade": "2.0.0",
    "angular2-in-memory-web-api": "0.0.20",
    "core-js": "^2.4.1",
    "ie-shim": "^0.1.0",
    "jquery": "^3.1.0",
    "reflect-metadata": "^0.1.3",
    "rxjs": "5.0.0-beta.12",
    "systemjs": "0.19.27",
    "zone.js": "^0.6.23"
  }
</code></pre>

<p>I've following html form.</p>

<pre><code>&lt;form #form="ngForm" (ngSubmit)="onSubmit()" novalidate&gt;

    &lt;div class="form-group"&gt;
        &lt;label&gt;Title&lt;/label&gt;
        &lt;input [(ngModel)]="model.Title" #title="ngModel" name="title" id="title" type="text" class="form-control" value=""&gt;
    &lt;/div&gt;

    &lt;div class="form-group"&gt;
        &lt;label&gt;Description&lt;/label&gt;
        &lt;textarea [(ngModel)]="model.Description" #description="ngModel" class="summernote form-control" name="description" id="description"&gt;&lt;/textarea&gt;
    &lt;/div&gt;

&lt;/form&gt;
</code></pre>

<p>And following <strong>category.component</strong> file</p>

<pre><code>import { Component } from '@angular/core';
import { FormBuilder} from '@angular/forms';
import { Category } from '../../../models/cms/Category';

@Component({
    selector: 'category',
    templateUrl: 'category.template.html'
})
export class CategoryComponent{

    model = new Category("dummyTitle","dummyDescription");

    onSubmit() {
        console.log(this.data);
    }   
}
</code></pre>

<p>Can someone please guide how to deal with this problem.</p>