What is the cleanest way to reset forms in Angular 2 latest version? I would like to reset the input textboxes after adding a post.
@Component({
selector: 'post-div',
template: `
<h2>Posts</h2>
<form (submit)="addPost()">
<label>Title: </label><input type="text" name="title" [(ngModel)]="title"><br/>
<label>Body: </label><input type="text" name="body" [(ngModel)]="body"><br/>
<input type="submit" value="Add Post">
</form>
<ul>
<li *ngFor="let post of posts">
<strong>{{post.title}}</strong>
<p>{{post.body}}</p>
</li>
</ul>
`,
providers: [PostService]
});
addPost(){
this.newPost = {
title: this.title,
body: this.body
}
this._postService.addPost(this.newPost);
}