NetanelBasal
7/20/2017 - 1:46 PM

new-story0.component.ts

@Component({
  selector: 'new-story-form',
  template: `
    <form [formGroup]="newStory"
          (submit)="submit($event)"
          (success)="onSuccess()"
          (error)="onError($event)"
          connectForm="newStory">
       ...controls
    </form>
    <div class="alert alert-success" *ngIf="success">Success!</div>
    <div class="alert alert-danger" *ngIf="error">{{error}}</div>
  `
})
class NewStoryFormComponent {...}