Dzmitry Shylovich
46023e4792
fix(select): allow for null values in HTML select options bound with ngValue
...
closes #12829
2016-11-14 16:47:14 -08:00
Craig Hutchison
b55aaf094f
fix: allow for null values in HTML select options bound with ngValue
...
This corrects the case of <option [ngValue]="null"> binding a string like "{0: null}" to the model instead of an actual null object.
Closes #10349
2016-11-14 16:47:09 -08:00
Craig Hutchison
d90b622fa4
fix: allow for null values in HTML select options bound with ngValue
...
This corrects the case of <option [ngValue]="null"> binding a string like "{0: null}" to the model instead of an actual null object.
Closes #10349
2016-11-14 16:47:09 -08:00
Victor Berchet
79e2bb9291
refactor(core): remove dead code ( #12871 )
2016-11-14 16:44:25 -08:00
Joao Dias
77ee27c59e
refactor(): use const and let instead of var
2016-11-12 16:40:17 -08:00
Tobias Bosch
69dfcf7385
docs(forms): add inline docs why `ngModel` runs a 2nd change detection run ( #12821 )
...
Related to #11895
2016-11-11 15:24:11 -08:00
Victor Berchet
45ddd6ba78
cleanup(forms): remove facade ( #12804 )
2016-11-11 10:47:34 -08:00
Victor Berchet
ef881475e9
fix(forms): check if registerOnValidatorChange exists on validator before trying to invoke it ( #12801 )
...
closes #12593
2016-11-10 16:20:59 -08:00
Dzmitry Shylovich
09092ac3c2
fix(forms): getRawValue returns any instead of Object ( #12599 )
2016-11-08 15:44:36 -08:00
Victor Berchet
ec92f4b198
refactor: remove `keys()` and `values()` from MapWrapper
2016-11-04 13:27:38 -07:00
Justin James
2b5c983c13
docs(reset): change semi-colon to colon in code example
...
The first code example for the reset function was invalid as it has a semi-colon instead of a colon for the last property in the json object. Change the semi-colon to a colon.
Closes https://github.com/angular/angular/issues/12531
2016-10-26 14:56:57 -07:00
Victor Berchet
57051f01ce
refactor: remove most facades ( #12399 )
2016-10-21 15:14:44 -07:00
Victor Berchet
76dd026447
refactor: remove some facades ( #12335 )
2016-10-19 13:42:39 -07:00
shaul almog
0e9503b500
feat(forms) range values need to be numbers instead of strings ( #11792 )
2016-10-19 10:12:13 -07:00
Pawel Kozlowski
97bc97153b
feat(forms): add ng-pending CSS class during async validation ( #11243 )
...
Closes #10336
2016-10-19 09:56:31 -07:00
Dzmitry Shylovich
445e5922ec
feat(forms): make 'parent' a public property of 'AbstractControl' ( #11855 )
2016-10-19 09:55:50 -07:00
Florian Kinder
b9fc090143
feat(forms): Added emitEvent to AbstractControl methods ( #11949 )
...
* feat(forms): Added emitEvent to AbstractControl methods
* style(forms): unified named parameter
2016-10-19 09:54:54 -07:00
Cédric Exbrayat
592f40aa9c
feat(forms): add hasError and getError to AbstractControlDirective ( #11985 )
...
Allows cleaner expressions in template-driven forms.
Before:
<label>Username</label><input name="username" ngModel required #username="ngModel">
<div *ngIf="username.dirty && username.control.hasError('required')">Username is required</div>
After:
<label>Username</label><input name="username" ngModel required #username="ngModel">
<div *ngIf="username.dirty && username.hasError('required')">Username is required</div>
Fixes #7255
2016-10-19 09:49:02 -07:00
Dzmitry Shylovich
bf60418fdc
feat(forms): Validator.pattern accepts a RegExp ( #12323 )
2016-10-19 09:37:54 -07:00
Florian Kinder
15fc5dd7ee
test(forms): added missing selfOnly tests ( #12317 )
2016-10-17 22:51:13 -07:00
Connor Wyatt
17e3410d98
Form submit event ( #11989 )
...
* feat(forms): ngSubmit event exposes $event from original submit event as local variable
Modify NgForm directive and FormGroup directive to expose the original submit event as $event in the ngSubmit event. Modify docs to reflect changes.
This resolves #10920 .
* refactor: code cleanup
2016-10-11 15:49:36 -07:00
Victor Berchet
d972d82354
refactor: simplify `isPresent(x) ? x : y` to `x || y` ( #12166 )
...
Closes #12166
2016-10-10 09:20:58 -07:00
Pawel Kozlowski
d22eeb70b8
fix(forms): allow optional fields with pattern and minlength validators ( #12147 )
2016-10-10 09:17:45 -07:00
Pawel Kozlowski
f50c1da4e2
fix(forms): properly validate blank strings with minlength ( #12091 )
2016-10-06 15:12:09 -07:00
Alex Eagle
8c975ed156
refactor(facade): inline StringWrapper ( #12051 )
2016-10-06 15:10:27 -07:00
Victor Berchet
cf269d9ff4
refactor: add license header to JS files & format files ( #12081 )
2016-10-04 20:39:20 -07:00
Pawel Kozlowski
4a57dcfd8d
fix(forms): properly validate empty strings with patterns ( #11450 )
2016-10-04 16:14:23 -07:00
Victor Berchet
50c37d45dc
refactor: simplify arrow functions ( #12057 )
2016-10-04 15:57:37 -07:00
Chuck Jazdzewski
43d3a84df3
Revert "refactor: add license header to JS files & format files ( #12035 )"
...
This reverts commit 8310c91823
.
2016-10-04 14:06:41 -07:00
Victor Berchet
8310c91823
refactor: add license header to JS files & format files ( #12035 )
2016-10-04 13:15:49 -07:00
Alex Eagle
b64b5ece65
refactor(facade): Remove most of StringMapWrapper facade. ( #12022 )
...
This change mostly automated by
12012b07a2
with some manual fixes.
2016-10-03 16:46:05 -07:00
Alex Eagle
0286956107
refactor(facade): Inline isBlank called with object-type argument ( #11992 )
2016-09-30 09:26:53 -07:00
Florian Kinder
36bc2ff269
docs(forms): Added FormControl initialization information ( #11948 )
2016-09-28 13:59:08 -07:00
Alex Eagle
41c8c30973
chore(lint): remove unused imports ( #11923 )
...
This was done automatically by tslint, which can now fix issues it finds.
The fixer is still pending in PR https://github.com/palantir/tslint/pull/1568
Also I have a local bugfix for https://github.com/palantir/tslint/issues/1569
which causes too many imports to be deleted.
2016-09-27 17:12:25 -07:00
Victor Berchet
58605cf350
refactor(facade): remove useless facades
2016-09-27 16:13:09 -07:00
Victor Berchet
33340dbbd1
docs: remove outdated docs ( #11875 )
2016-09-24 08:23:28 +09:00
Kara Erickson
212f8dbde7
fix(forms): disable all radios with disable()
2016-09-20 15:00:12 -07:00
Kara
44da4984f9
fix(forms): support unbound disabled in ngModel ( #11736 )
2016-09-20 14:55:47 -07:00
Victor Berchet
671f73448c
refactor: misc cleanup ( #11654 )
2016-09-19 17:15:57 -07:00
Kara
51d73d3e4e
fix(forms): make setDisabledState optional for reactive form directives ( #11731 )
...
Closes #11719
2016-09-19 16:26:33 -07:00
Kara
bf81b06a28
docs(forms): add select control examples ( #11728 )
2016-09-19 16:25:33 -07:00
Kara
fa4723a208
docs(forms): add radio button examples ( #11676 )
2016-09-19 10:41:20 -07:00
Jason Choi
df4254ae89
refactor(facade): move isPromise to core private ( #10573 )
2016-09-18 15:55:08 -07:00
Igor Minar
cb657c4b55
docs: update descriptions in package.jsons
2016-09-14 16:44:39 -07:00
Kara Erickson
7105021c41
docs(forms): add docs for FormArray
2016-09-13 14:00:52 -07:00
Kara Erickson
f7313db0be
docs(forms): add docs for FormGroup
2016-09-13 14:00:52 -07:00
Kara Erickson
1d2e70e3a4
docs(forms): add docs for FormControl
2016-09-13 14:00:52 -07:00
Kara Erickson
21516c32e6
docs(forms): add docs for AbstractControl
2016-09-13 14:00:52 -07:00
Kara
e71558ba89
docs(forms): update docs for FormBuilder ( #11548 )
2016-09-13 13:23:31 -07:00
Kara
26d1423ae9
docs(forms): update docs for NgForm ( #11547 )
2016-09-12 17:01:04 -07:00