Skip to content

Commit

Permalink
webapp: Use new Angular 2 forms
Browse files Browse the repository at this point in the history
  • Loading branch information
tchap committed Jun 28, 2016
1 parent 5b4250f commit 4c77c90
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion server/app/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { bootstrap } from '@angular/platform-browser-dynamic';
import { bootstrap } from '@angular/platform-browser-dynamic';
import { disableDeprecatedForms, provideForms } from '@angular/forms';

import { AppComponent } from './app.component';
import { APP_ROUTER_PROVIDERS } from './app.routes';


bootstrap(AppComponent, [
disableDeprecatedForms(), provideForms(),
APP_ROUTER_PROVIDERS
]);
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ <h2><img src="/assets/img/Slack_Mark_Web-100x100.png"> Slack</h2>
<form (ngSubmit)="onSubmit()" #slackForm="ngForm" class="notification-form">
<div class="form-group">
<label for="webhookURL">Webhook URL</label>
<input type="url" class="form-control" required
<input type="url" class="form-control" name="webhookURL" required
(keyup)="inputChanged()"
[(ngModel)]="model.settings.webhookURL"
ngControl="webhookURL" #webhookURL="ngForm" #input>
ngControl="webhookURL" #webhookURL="ngModel" #input>
<div [hidden]="webhookURL.valid || webhookURL.pristine"
class="alert alert-danger"
>Webhook URL is required</div>
Expand Down

0 comments on commit 4c77c90

Please sign in to comment.