diff --git a/modules/angular2/src/forms/directives/template_driven_form_directive.ts b/modules/angular2/src/forms/directives/template_driven_form_directive.ts index b601fb6313..fb39da64cb 100644 --- a/modules/angular2/src/forms/directives/template_driven_form_directive.ts +++ b/modules/angular2/src/forms/directives/template_driven_form_directive.ts @@ -13,7 +13,10 @@ import {setUpControl} from './shared'; const formDirectiveBinding = CONST_EXPR(new Binding( ControlContainerDirective, {toAlias: FORWARD_REF(() => TemplateDrivenFormDirective)})); -@Directive({selector: '[form]', hostInjector: [formDirectiveBinding]}) +@Directive({ + selector: 'form:not([ng-no-form]):not([form-model]),ng-form,[ng-form]', + hostInjector: [formDirectiveBinding] +}) export class TemplateDrivenFormDirective extends ControlContainerDirective implements FormDirective { form: ControlGroup; diff --git a/modules/angular2/test/forms/integration_spec.ts b/modules/angular2/test/forms/integration_spec.ts index 4798c79bdf..bee7092718 100644 --- a/modules/angular2/test/forms/integration_spec.ts +++ b/modules/angular2/test/forms/integration_spec.ts @@ -427,11 +427,11 @@ export function main() { inject([TestBed], fakeAsync(tb => { var ctx = MyComp.create({name: null}); - var t = `