refactor: move angular source to /packages rather than modules/@angular
This commit is contained in:
29
packages/forms/src/directives/ng_no_validate_directive.ts
Normal file
29
packages/forms/src/directives/ng_no_validate_directive.ts
Normal file
@ -0,0 +1,29 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {Directive} from '@angular/core';
|
||||
|
||||
/**
|
||||
* @whatItDoes Adds `novalidate` attribute to all forms by default.
|
||||
*
|
||||
* `novalidate` is used to disable browser's native form validation.
|
||||
*
|
||||
* If you want to use native validation with Angular forms, just add `ngNativeValidate` attribute:
|
||||
*
|
||||
* ```
|
||||
* <form ngNativeValidate></form>
|
||||
* ```
|
||||
*
|
||||
* @experimental
|
||||
*/
|
||||
@Directive({
|
||||
selector: 'form:not([ngNoForm]):not([ngNativeValidate])',
|
||||
host: {'novalidate': ''},
|
||||
})
|
||||
export class NgNoValidate {
|
||||
}
|
Reference in New Issue
Block a user