ngforms 4.1.1 ngforms: ^4.1.1 copied to clipboard
Forms framework for AngularDart. Easily create forms to accept input from users.
4.1.1 #
- REFACTOR: use the new super initializers in Dart 2.17.
- FIX: bring back original import file for compatibility.
4.1.0 #
- Require Dart >=2.17.0
- Update
pubspec.yaml
to improve pub score. - Rename the main export file from
angular_forms.dart
tongforms.dart
.
4.0.1 #
- Update
README.md
.
4.0.0 #
- Support null safety
- Require Dart ^2.14.0
3.0.0 #
- Stable release
2.1.5 #
New Features #
- Push down
update
stream to NgControl so that code can imperatively listen to view changes.
2.1.4 #
- Maintenance release to support Angular 6.0-alpha+1.
2.1.3 #
- Maintenance release to support Angular 6.0-alpha.
2.1.2 #
- Maintenance release to support Angular 5.3.
2.1.1 #
- Maintenance release to support Angular 5.2.
2.1.0 #
New Features #
PatternValidator
now has apattern
input. This allows thepattern
property to be set dynamically. Previously, this could only be specified statically at compile time.
2.0.0 #
New Features #
-
Add AbstractControlGroup and AbstractNgForm to allow infrastructure to create their own form systems that can be backed by types such as a proto, or have different control group logic. Allow NgFormModel and NgControlGroup to work with abstract group.
-
reset
method added toAbstractControl
andAbstractControlDirective
. -
RequiredValidator
now has arequired
input. This allows therequired
property to be toggled at runtime. Previously, this could only be set statically at compile time. -
Control.invalid
getter added. -
Control.markAsPristine
added. This will clear thedirty
property. -
Add
ngDisabled
input to all Control directives. -
Add
MemorizedForm
directive. This is a form that will not remove controls if the control is taken out of the view, for example with a [NgIf]. -
Add
disabled
state toAbstractControl
models. Note: This is not yet supported in the template-driven directives. -
Add
markAsUntouched
method toAbstractControl
. -
Add a type annotation,
T
, toAbstractControl
, which is tied to the type ofvalue
. -
ControlGroup
nowextends AbstractControl<Map<String, dynamic>>
. -
ControlArray
nowextends AbstractControl<List>
.
Breaking Changes #
-
Use value from AbstractControl for valueChanges event instead of internal variable. Allows code to more easily subclass AbstractControl.
-
Remove deprecated
NG_VALUE_ACCESSOR
token. UsengValueAccessor
instead. -
Abstract
updateValue
method added toAbstractControl
. All subclasses ofAbstractControl
will need to implement this method. -
NgControlName
will no longer initialize withnull
if a value is specified by 'ngModel'. -
The
touched
property ofControl
s is now propagated to parents / children. -
NgControlGroup
can no longer be injected directly. It can still be injected as aControlContainer
. -
NgControlName
andNgFormControl
can no longer be injected directly. They can still be injected as aNgControl
. -
The following directives are no longer injectable:
CheckboxControlValueAccessor
DefaultValueAccnessor
MaxLengthValidator
MinLengthValidator
NgControlStatus
NgSelectOption
NumberValueAccessor
PatternValidator
RadioControlValueAccessor
RequiredValidator
-
Add
ControlValueAccessor.onDisabledChanged()
method. All implementations ofControlValueAccessor
need to add this method. -
Remove
include
andexclude
methods fromControlGroup
. These can be replaced with calls tomarkAsEnabled
andmarkAsDisabled
instead.Before:
controlGroup.include('foo');
After:
controlGroup.controls['foo'].markAsEnabled();
-
CheckboxControlValueAccessor
now implementsControlValueAccessor<bool>
andRadioControlValueAccessor
now implementsControlValueAccessor<RadioButtonState>
. Previously, they were bothControlValueAccessor<dynamic>
. -
Remove
optionals
param fromControlGroup
constructor. This has been replaced bydisabled
state for allControls
. See https://github.com/angulardart/angular/issues/1037 for more details. -
AbstractControl.find
now only accepts a String. To supply a list, useAbstractControl.findPath
instead. Also, forfind
orfindPath
,ControlArray
index is now callingint.parse
instead of expecting a raw number. -
Properly typed the generic parameter on subclasses of
AbstractControlDirective
. Now,NgControl.control
will return aControl
, andControlContainer.control
will return aControlGroup
. There may be some unnecessary casts that can now be cleaned up. -
FormBuilder
instance methodsgroup
,control
, andarray
have been removed. ForFormBuilder.control
, just callnew Control(value, validator)
directly. ForFormBuilder.group
andFormBuilder.array
, use the static methodsFormBuilder.controlGroup
andFormBuilder.controlArray
, respectively.FormBuilder
is no longerInjectable
. -
Changed type of
AbstractControl.statusChanges
fromStream<dynamic>
toStream<String>
. This now matches the type forAbstractControl.status
, which as always been aString
. -
Allow expressions for maxlength/minlength validators. Breaking change does not support string values for maxlength/minlength anymore.
minlength="12"
now should be written[minlength]="12"
Bug fixes #
-
Add a not selector to ngForm for memorizedForm since memorized_form is now in angular_forms. This fixes the DIRECTIVE_EXPORTED_BY_AMBIGIOUS error when using: <form #form="ngForm" memorizedForm>
-
Don't throw a null pointer exception in NgFormModel if a directives asks for a Control value before the form is initialized.
1.0.0 #
- Support for angular 4.0.0.
0.1.0 #
- Initial commit of
angular_forms
.