Zhicheng WANG
b035e68480
Merge remote-tracking branch 'en/master' into aio
...
# Conflicts:
# .travis.yml
# aio/content/guide/aot-compiler.md
# aio/content/guide/architecture.md
# aio/content/guide/build.md
# aio/content/guide/dependency-injection-in-action.md
# aio/content/guide/deployment.md
# aio/content/guide/elements.md
# aio/content/guide/file-structure.md
# aio/content/guide/glossary.md
# aio/content/guide/hierarchical-dependency-injection.md
# aio/content/guide/lifecycle-hooks.md
# aio/content/guide/ngmodule-faq.md
# aio/content/guide/pipes.md
# aio/content/guide/router.md
# aio/content/guide/rx-library.md
# aio/content/guide/service-worker-communications.md
# aio/content/guide/service-worker-config.md
# aio/content/guide/singleton-services.md
# aio/content/guide/template-syntax.md
# aio/content/guide/testing.md
# aio/content/guide/typescript-configuration.md
# aio/content/guide/universal.md
# aio/content/marketing/docs.md
# aio/content/marketing/features.html
# aio/content/tutorial/toh-pt0.md
# aio/content/tutorial/toh-pt6.md
# aio/package.json
# aio/src/app/layout/footer/footer.component.html
# aio/tools/transforms/templates/api/lib/memberHelpers.html
# aio/yarn.lock
# integration/cli-hello-world-ivy-minimal/src/polyfills.ts
# modules/benchmarks/e2e_test/largetable_perf.ts
# modules/benchmarks/e2e_test/largetable_spec.ts
# packages/animations/src/animation_metadata.ts
# packages/common/http/src/headers.ts
# packages/common/http/src/interceptor.ts
# packages/common/src/directives/ng_for_of.ts
# packages/common/src/directives/ng_if.ts
# packages/common/src/directives/ng_style.ts
# packages/common/src/directives/ng_switch.ts
# packages/core/src/change_detection/change_detection_util.ts
# packages/core/src/di/injectable.ts
# packages/core/src/interface/lifecycle_hooks.ts
# packages/core/src/linker/template_ref.ts
# packages/core/src/metadata/di.ts
# packages/core/src/metadata/directives.ts
# packages/core/src/metadata/ng_module.ts
# packages/core/src/render/api.ts
# packages/forms/src/form_providers.ts
# packages/forms/src/model.ts
# packages/router/src/config.ts
# packages/router/src/directives/router_link.ts
2019-02-17 00:00:16 +08:00
Artem Lanovyy
1df3aefb81
fix(forms): mark form as pristine before emitting value and status change events ( #28395 )
...
BREAKING CHANGE
Previous to this change, when a control was reset, value and status change
events would be emitted before the control was reset to pristine. As a
result, if one were to check a control's pristine state in a valueChange
listener, it would appear that the control was still dirty after reset.
This change delays emission of value and status change events until after
controls have been marked pristine. This means the pristine state will be
reset as expected if one checks in a listener.
Theoretically, there could be applications depending on checking whether a
control *used to be dirty*, so this is marked as breaking. In these cases,
apps should cache the state on the app side before calling reset.
Fixes #28130
PR Close #28395
2019-02-13 19:17:35 -08:00
Martin Sikora
ef6728207b
fix(forms): don't override form group's dirty state when disabling controls ( #24591 )
...
Update packages/forms/src/model.ts
Co-Authored-By: martinsik <martin.sikora.ahoj@gmail.com>
PR Close #24591
2019-01-25 12:59:07 -08:00
alsami
45bf911df8
feat(forms): add markAllAsTouched()
to AbstractControl
( #26812 )
...
Add functionality to mark a control and its descendant controls as touched
Closes #19400
PR Close #26812
2019-01-18 10:12:21 -08:00
Pete Bacon Darwin
9a128a8068
docs(forms): fix up @see
tags for AbstractContol
( #28069 )
...
PR Close #28069
2019-01-11 14:35:23 -08:00
Fabian Wiles
1b0b36d143
fix(forms): match getError and hasError to get method signature ( #20211 )
...
Internally getError and hasError call the AbstractControl#get method which takes `path: Array<string | number> | string` as input, since there are different ways to traverse the AbstractControl tree.
This change matches the method signitures of all methods that use this.
PR Close #20211
2019-01-03 10:16:06 -08:00
Kara Erickson
e268a0579a
docs(forms): update desc for hasError and getError ( #27861 )
...
This commit adds docs for the changes made in #20211 .
Closes #19734 .
PR Close #27861
2019-01-03 10:15:23 -08:00
Zhicheng WANG
8744f17f5d
Merge remote-tracking branch 'en/master' into aio
...
# Conflicts:
# aio/content/cli/index.md
# aio/content/file-not-found.md
# aio/content/guide/architecture-modules.md
# aio/content/guide/architecture-services.md
# aio/content/guide/build.md
# aio/content/guide/deployment.md
# aio/content/guide/elements.md
# aio/content/guide/feature-modules.md
# aio/content/guide/file-structure.md
# aio/content/guide/forms-overview.md
# aio/content/guide/glossary.md
# aio/content/guide/i18n.md
# aio/content/guide/npm-packages.md
# aio/content/guide/releases.md
# aio/content/guide/router.md
# aio/content/guide/service-worker-config.md
# aio/content/guide/service-worker-intro.md
# aio/content/guide/testing.md
# aio/content/guide/upgrade-performance.md
# aio/content/navigation.json
# aio/content/tutorial/toh-pt0.md
# aio/content/tutorial/toh-pt5.md
# aio/content/tutorial/toh-pt6.md
# aio/package.json
# aio/src/app/custom-elements/api/api-list.component.ts
# aio/src/app/documents/document.service.ts
# aio/src/app/layout/top-menu/top-menu.component.ts
# aio/src/index.html
# aio/src/styles/2-modules/_api-pages.scss
# aio/tools/transforms/templates/api/base.template.html
# aio/tools/transforms/templates/api/lib/memberHelpers.html
# aio/tools/transforms/templates/cli/cli-container.template.html
# aio/tools/transforms/templates/lib/githubLinks.html
# aio/yarn.lock
# packages/animations/src/animation_metadata.ts
# packages/common/http/src/backend.ts
# packages/common/http/src/client.ts
# packages/common/http/src/headers.ts
# packages/common/http/src/interceptor.ts
# packages/common/http/src/module.ts
# packages/common/http/src/params.ts
# packages/common/http/src/request.ts
# packages/common/http/src/response.ts
# packages/common/src/common_module.ts
# packages/common/src/directives/ng_class.ts
# packages/common/src/directives/ng_style.ts
# packages/common/src/directives/ng_switch.ts
# packages/common/src/i18n/format_date.ts
# packages/common/src/pipes/number_pipe.ts
# packages/core/src/change_detection/change_detection_util.ts
# packages/core/src/change_detection/pipe_transform.ts
# packages/core/src/di/injectable.ts
# packages/core/src/linker/element_ref.ts
# packages/core/src/linker/template_ref.ts
# packages/core/src/metadata/di.ts
# packages/core/src/metadata/directives.ts
# packages/core/src/metadata/lifecycle_hooks.ts
# packages/core/src/metadata/ng_module.ts
# packages/core/src/render/api.ts
# packages/forms/src/directives/form_interface.ts
# packages/forms/src/directives/ng_form.ts
# packages/forms/src/directives/ng_model.ts
# packages/forms/src/directives/reactive_directives/form_control_name.ts
# packages/forms/src/directives/select_control_value_accessor.ts
# packages/forms/src/directives/validators.ts
# packages/forms/src/form_builder.ts
# packages/forms/src/form_providers.ts
# packages/forms/src/model.ts
# packages/forms/src/validators.ts
# packages/platform-browser/src/browser.ts
# packages/platform-browser/src/security/dom_sanitization_service.ts
# packages/router/src/config.ts
# packages/router/src/events.ts
# packages/router/src/router.ts
# packages/router/src/router_module.ts
# packages/router/src/shared.ts
2018-12-29 16:04:37 +08:00
Brandon Roberts
a433baf99a
docs(forms): update API reference for validator directives ( #26926 )
...
PR Close #26926
2018-12-17 16:45:35 -08:00
Nick Tobolski
975c269752
docs(forms): language correction ( #27177 )
...
Word missing from docs
PR Close #27177
2018-11-20 10:46:34 -08:00
Huáng Jùnliàng
34306c356e
docs(forms): close markdown backticks ( #27189 )
...
PR Close #27189
2018-11-20 10:45:16 -08:00
Zhicheng Wang
a9ac90d3df
Merge remote-tracking branch 'en/master' into aio
...
# Conflicts:
# aio/content/guide/ajs-quick-reference.md
# aio/content/guide/animations.md
# aio/content/guide/aot-compiler.md
# aio/content/guide/architecture-components.md
# aio/content/guide/architecture-modules.md
# aio/content/guide/architecture-next-steps.md
# aio/content/guide/architecture-services.md
# aio/content/guide/architecture.md
# aio/content/guide/attribute-directives.md
# aio/content/guide/bootstrapping.md
# aio/content/guide/browser-support.md
# aio/content/guide/cheatsheet.md
# aio/content/guide/comparing-observables.md
# aio/content/guide/component-interaction.md
# aio/content/guide/component-styles.md
# aio/content/guide/dependency-injection-in-action.md
# aio/content/guide/dependency-injection-pattern.md
# aio/content/guide/dependency-injection.md
# aio/content/guide/deployment.md
# aio/content/guide/displaying-data.md
# aio/content/guide/dynamic-component-loader.md
# aio/content/guide/elements.md
# aio/content/guide/feature-modules.md
# aio/content/guide/form-validation.md
# aio/content/guide/forms.md
# aio/content/guide/glossary.md
# aio/content/guide/hierarchical-dependency-injection.md
# aio/content/guide/i18n.md
# aio/content/guide/lazy-loading-ngmodules.md
# aio/content/guide/lifecycle-hooks.md
# aio/content/guide/ngmodule-faq.md
# aio/content/guide/ngmodule-vs-jsmodule.md
# aio/content/guide/ngmodules.md
# aio/content/guide/npm-packages.md
# aio/content/guide/observables-in-angular.md
# aio/content/guide/observables.md
# aio/content/guide/pipes.md
# aio/content/guide/practical-observable-usage.md
# aio/content/guide/providers.md
# aio/content/guide/quickstart.md
# aio/content/guide/reactive-forms.md
# aio/content/guide/router.md
# aio/content/guide/rx-library.md
# aio/content/guide/security.md
# aio/content/guide/service-worker-communications.md
# aio/content/guide/service-worker-getting-started.md
# aio/content/guide/service-worker-intro.md
# aio/content/guide/setup-systemjs-anatomy.md
# aio/content/guide/setup.md
# aio/content/guide/singleton-services.md
# aio/content/guide/structural-directives.md
# aio/content/guide/styleguide.md
# aio/content/guide/template-syntax.md
# aio/content/guide/testing.md
# aio/content/guide/typescript-configuration.md
# aio/content/guide/universal.md
# aio/content/guide/updating.md
# aio/content/guide/upgrade.md
# aio/content/guide/user-input.md
# aio/content/guide/visual-studio-2015.md
# aio/content/marketing/docs.md
# aio/content/navigation.json
# aio/content/tutorial/toh-pt0.md
# aio/content/tutorial/toh-pt1.md
# aio/content/tutorial/toh-pt2.md
# aio/content/tutorial/toh-pt3.md
# aio/content/tutorial/toh-pt4.md
# aio/content/tutorial/toh-pt5.md
# aio/content/tutorial/toh-pt6.md
# aio/ngsw-manifest.json
# aio/package.json
# aio/src/app/custom-elements/api/api-list.component.html
# aio/src/app/custom-elements/api/api-list.component.ts
# aio/src/index.html
# aio/tools/transforms/templates/api/base.template.html
# aio/tools/transforms/templates/api/class.template.html
# aio/tools/transforms/templates/api/directive.template.html
# aio/tools/transforms/templates/api/enum.template.html
# aio/tools/transforms/templates/api/includes/class-overview.html
# aio/tools/transforms/templates/api/includes/deprecation.html
# aio/tools/transforms/templates/api/includes/export-as.html
# aio/tools/transforms/templates/api/includes/info-bar.html
# aio/tools/transforms/templates/api/includes/interface-overview.html
# aio/tools/transforms/templates/api/includes/selectors.html
# aio/tools/transforms/templates/api/lib/directiveHelpers.html
# aio/tools/transforms/templates/api/lib/githubLinks.html
# aio/tools/transforms/templates/api/lib/memberHelpers.html
# aio/tools/transforms/templates/api/package.template.html
# aio/yarn.lock
# packages/common/http/src/module.ts
# packages/common/src/common_module.ts
# packages/common/src/directives/ng_for_of.ts
# packages/common/src/directives/ng_if.ts
# packages/common/src/directives/ng_template_outlet.ts
# packages/common/src/location/location.ts
# packages/common/src/pipes/async_pipe.ts
# packages/common/src/pipes/json_pipe.ts
# packages/common/src/pipes/number_pipe.ts
# packages/common/src/pipes/slice_pipe.ts
# packages/core/src/change_detection/change_detector_ref.ts
# packages/core/src/di/injectable.ts
# packages/core/src/linker/template_ref.ts
# packages/core/src/linker/view_container_ref.ts
# packages/core/src/metadata/di.ts
# packages/core/src/metadata/ng_module.ts
# packages/core/src/render/api.ts
# packages/forms/src/directives/form_interface.ts
# packages/forms/src/directives/ng_form.ts
# packages/forms/src/directives/ng_model.ts
# packages/forms/src/directives/reactive_directives/form_control_name.ts
# packages/forms/src/directives/select_control_value_accessor.ts
# packages/forms/src/directives/validators.ts
# packages/forms/src/form_providers.ts
# packages/forms/src/model.ts
# packages/forms/src/validators.ts
# packages/router/src/config.ts
# packages/router/src/router.ts
# packages/router/src/router_module.ts
# packages/router/src/router_state.ts
2018-10-21 17:43:29 +08:00
Pete Bacon Darwin
982bc7f2aa
docs: update forms with @publicApi
tags ( #26595 )
...
PR Close #26595
2018-10-19 14:35:53 -07:00
Pete Bacon Darwin
24521f549c
docs: convert all @experimental
tags to @publicApi
tags ( #26595 )
...
PR Close #26595
2018-10-19 14:35:52 -07:00
Frederik Schlemmer
1e02cd9961
docs: Fixes typo in FormArray ( #26031 )
...
PR Close #26031
2018-09-24 09:14:07 -07:00
Pete Bacon Darwin
7d39bc68fb
docs(forms): move extended text to @usageNotes ( #26039 )
...
Headings are not allowed in the basic description block.
PR Close #26039
2018-09-24 09:11:02 -07:00
George Wilde
ddd3bf83c7
docs(forms): change documentation of the FormGroup patchValue method ( #25901 )
...
Improve the grammar of the description to make it more readable.
PR Close #25901
2018-09-18 13:08:05 -07:00
Zhicheng Wang
e436d6972b
docs(API): 翻译完了几个表单控件类
2018-09-01 09:19:36 +08:00
denjamal
3f6fc00d73
docs(forms): fix incorrect variables naming in the comments ( #25150 )
...
PR Close #25150
2018-07-31 11:42:15 -07:00
Brandon Roberts
80a74b450a
docs(forms): update form builder API reference ( #24693 )
...
PR Close #24693
2018-07-12 16:38:26 -04:00
Rado Kirov
c95437f15d
build(bazel): Turning on strictPropertyInitialization for Angular. ( #24572 )
...
All errors for existing fields have been detected and suppressed with a
`!` assertion.
Issue/24571 is tracking proper clean up of those instances.
One-line change required in ivy/compilation.ts, because it appears that
the new syntax causes tsickle emitted node to no longer track their
original sourceFiles.
PR Close #24572
2018-06-25 07:57:13 -07:00
Brandon Roberts
5b76f04b7f
docs: More edits ( #24255 )
...
PR Close #24255
2018-06-19 10:53:13 -07:00
Brandon Roberts
a57825acf3
docs: More form control API edits ( #24255 )
...
PR Close #24255
2018-06-19 10:53:13 -07:00
Brandon Roberts
efc7639352
docs: Added multicast to observable descriptions ( #24255 )
...
PR Close #24255
2018-06-19 10:53:13 -07:00
Brandon Roberts
3e26cabe02
docs: formatting ( #24255 )
...
PR Close #24255
2018-06-19 10:53:13 -07:00
Brandon Roberts
9d114c052a
docs: More form control API references fixes ( #24255 )
...
PR Close #24255
2018-06-19 10:53:13 -07:00
Brandon Roberts
43e61c25e1
docs(docs-infra): Update with review changes ( #24255 )
...
PR Close #24255
2018-06-19 10:53:13 -07:00
Brandon Roberts
4e1493a1d6
docs(forms): update API reference for FormControl ( #24255 )
...
PR Close #24255
2018-06-19 10:53:13 -07:00
Trotyl
9367e91402
fix(forms): properly handle special properties in FormGroup.get ( #22249 )
...
closes #17195
PR Close #22249
2018-06-05 18:28:13 -07:00
Johnson Lin
b86d4dee4d
docs(forms): fix API doc ( #24210 )
...
closes #24090
PR Close #24210
2018-05-30 17:06:12 -07:00
Pete Bacon Darwin
4b96a58c5a
docs: remove all deprecated @stable
jsdoc tags ( #23210 )
...
These are no longer needed as stable docs are computed as those that
do not have `@experimental` or `@deprecated` tags.
PR Close #23210
2018-04-10 21:49:32 -07:00
Pete Bacon Darwin
92821e338b
docs(forms): remove unnecessary {@link Injector}
jsdoc tags ( #23186 )
...
Inline code blocks are automatically linked, if possible, to their API
page.
PR Close #23186
2018-04-05 09:27:29 -07:00
Pete Bacon Darwin
1aef4df127
docs(forms): migrate @whatItDoes
tags to the description ( #23186 )
...
We get the overview for the doc by splitting off the first
paragraph.
PR Close #23186
2018-04-05 09:27:29 -07:00
Pete Bacon Darwin
0a065bbdcf
docs(forms): migrate deprecated @howToUse
tags ( #23186 )
...
In this case they have been converted to `@description` tags.
PR Close #23186
2018-04-05 09:27:29 -07:00
Igor Minar
b43f8bc7d3
feat(core): upgrade rxjs to 6.0.0-alpha.4 ( #22573 )
...
PR Close #22573
2018-03-19 21:51:51 -07:00
Fabian Wiles
e86b64b620
feat(forms): allow markAsPending to emit events ( #20212 )
...
closes #17958
BREAKING CHANGE:
- `AbstractControl#statusChanges` now emits an event of `'PENDING'` when you call `AbstractControl#markAsPending`
- Previously it did not emit an event when you called `markAsPending`
- To migrate you would need to ensure that if you are filtering or checking events from `statusChanges` that you account for the new event when calling `markAsPending`
PR Close #20212
2018-02-22 11:15:33 -08:00
Pete Bacon Darwin
7007f51c35
feat(aio): first pass API docs redesign ( #21874 )
...
Includes:
* display ToC for API docs
* update dgeni-packages to 0.24.1
* add floating sidebar in API docs
* add breadcrumbs and structured data for Google crawler
* improved rendering of method overloads
* properties rendered in a table
* params rendered with docs
* removal of outdated "infobox" from all API docs
PR Close #21874
2018-02-09 13:05:16 -08:00
Kevin Fahy
0bcfae7cac
fix(forms): prevent event emission on enable/disable when emitEvent is false ( #12366 ) ( #21018 )
...
Previously, the emitEvent flag was only checked when emitting on the current control.
Thus, if the control was part of a hierarchy, events were emitted on the parent and the childrens.
This fixes the issue by properly passing the emitEvent flag to both parent and childrens.
Fixes #12366
PR Close #21018
2018-02-07 12:05:26 -08:00
Trotyl
2707012181
fix(forms): publish missing types ( #19941 )
...
PR Close #19941
2018-02-06 08:02:15 -08:00
Kara Erickson
b4cd27979b
fix(forms): inserting and removing controls should work in re-bound form arrays ( #21822 )
...
Closes #21501
PR Close #21822
2018-01-29 16:11:41 -08:00
Fabian Wiles
d41d2c460a
feat(forms): allow nulls on setAsyncValidators ( #20327 )
...
closes #20296
PR Close #20327
2017-12-07 13:34:12 -08:00
Kara Erickson
69c53c3e03
fix(forms): updateOn should check if change occurred ( #20358 )
...
Fixes #20259 .
PR Close #20358
2017-11-17 16:28:46 -06:00
George Kalpakas
901436e46f
docs: fix link texts
...
Fixes #19701
PR Close #19709
2017-11-01 15:44:59 -04:00
Yuan Gao
17eaef0311
refactor(forms): Remove readonly getters in forms ( #19188 )
...
PR Close #19188
2017-09-20 12:38:12 -07:00
Kara Erickson
5e840e1e79
docs(forms): add api docs for AbstractControlDirective
2017-08-15 15:03:12 -07:00
Kara
ff5c58be6b
feat(forms): add default updateOn values for groups and arrays ( #18536 )
...
This commit adds support for setting default `updateOn` values
in `FormGroups` and `FormArrays`. If you set `updateOn` to
’blur’` at the group level, all child controls will default to `’blur’`,
unless the child has explicitly specified a different `updateOn` value.
```
const c = new FormGroup({
one: new FormControl()
}, {updateOn: blur});
```
It's worth noting that parent groups will always update their value and
validity immediately upon value/validity updates from children. In other
words, if a group is set to update on blur and its children are individually
set to update on change, the group will still update on change with its
children; its default value will simply not be used.
2017-08-09 15:41:53 -07:00
Kara
f69561b2de
feat(forms): add updateOn submit option to FormControls ( #18514 )
2017-08-07 15:39:25 -07:00
Kara
333a708bb6
feat(forms): add updateOn blur option to FormControls ( #18408 )
...
By default, the value and validation status of a `FormControl` updates
whenever its value changes. If an application has heavy validation
requirements, updating on every text change can sometimes be too expensive.
This commit introduces a new option that improves performance by delaying
form control updates until the "blur" event. To use it, set the `updateOn`
option to `blur` when instantiating the `FormControl`.
```ts
// example without validators
const c = new FormControl(, { updateOn: blur });
// example with validators
const c= new FormControl(, {
validators: Validators.required,
updateOn: blur
});
```
Like in AngularJS, setting `updateOn` to `blur` will delay the update of
the value as well as the validation status. Updating value and validity
together keeps the system easy to reason about, as the two will always be
in sync. It's also worth noting that the value/validation pipeline does
still run when the form is initialized (in order to support initial values).
Closes #7113
2017-08-02 18:10:10 -07:00
Kara Erickson
ebef5e697a
feat(forms): add options arg to abstract controls
...
FormControls, FormGroups, and FormArrays now optionally accept an options
object as their second argument. Validators and async validators can be
passed in as part of this options object (though they can still be passed
in as the second and third arg as before).
```ts
const c = new FormControl(, {
validators: [Validators.required],
asyncValidators: [myAsyncValidator]
});
```
This commit also adds support for passing arrays of validators and async
validators to FormGroups and FormArrays, which formerly only accepted
individual functions.
```ts
const g = new FormGroup({
one: new FormControl()
}, [myPasswordValidator, myOtherValidator]);
```
This change paves the way for adding more options to AbstractControls,
such as more fine-grained control of validation timing.
2017-07-31 11:29:32 -07:00
Alex Rickabaugh
c59c390cdc
fix: argument destructuring sometimes breaks strictNullChecks
...
Destructuring of the form:
function foo({a, b}: {a?, b?} = {})
breaks strictNullChecks, due to the TypeScript bug https://github.com/microsoft/typescript/issues/10078 .
This change eliminates usage of destructuring in function argument lists in cases where it would leak
into the public API .d.ts.
2017-06-20 12:56:08 -07:00