Commit Graph

91 Commits

Author SHA1 Message Date
Kara 673de004d2 fix(forms): clear errors on disable (#11463)
Closes #11287
2016-09-09 12:00:38 -07:00
Rob Wormald d296298282 fix(build): prevent package tsconfigs from shadowing main tsconfig (#11454) 2016-09-08 15:01:22 -07:00
Pawel Kozlowski 436af15d63 refactor: remove parseFloat from facades (#11446) 2016-09-08 13:54:10 -07:00
Kara 7b24028437 fix(forms): fix disabled support for empty form containers (#11427)
Closes #11386
2016-09-08 12:21:48 -07:00
Kara 8c09933803 fix(forms): support rebinding nested controls (#11210) 2016-09-02 15:57:35 -07:00
Kara 043493cb62 fix(forms): disabled controls should never be invalid (#11257)
Closes #11253
2016-09-01 16:51:42 -07:00
Igor Minar 174c016104 fix(bundles): correct RxJS mapping in rollup config for umd/es5 bundles 2016-08-30 21:07:45 -07:00
Miško Hevery 979657989b fix(packages): use ES modules for primary build (#11120) 2016-08-30 18:07:40 -07:00
Kara e8a1566065 fix(forms): support radio buttons with same name but diff parent (#11152)
Closes #10065
2016-08-29 17:49:42 -07:00
Kara Erickson d2ad871279 fix(forms): update validity when validator dir changes
closes #11116
2016-08-29 13:12:46 -07:00
Javier Ros 0b665c0ece feat(validations): add support to bind validation attributes
This change enables to bind the validations attributes `required`,
`minlength`, `maxlength` and `pattern`.

Closes: #10505, #7393
2016-08-29 13:12:20 -07:00
Misko Hevery 7c07bfff97 fix(errors): [2/2] Rename Exception to Error; remove from public API
BREAKING CHANGE:

Exceptions are no longer part of the public API. We don't expect that anyone should be referring to the Exception types.

ExceptionHandler.call(exception: any, stackTrace?: any, reason?: string): void;
change to:
ErrorHandler.handleError(error: any): void;
2016-08-26 10:37:17 -07:00
Kara ce08982f78 fix(forms): fix conflicting getter name (#11081) 2016-08-25 14:56:31 -07:00
Marc Laval cbe0976426 test: improve perfs by removing unneeded TestBed.compileComponents() calls (#11083) 2016-08-25 14:56:14 -07:00
Kara 515ff61fcb fix(forms): fully support rebinding form group directive (#11051) 2016-08-25 14:37:57 -07:00
Marc Laval d7c82f5c0f test: fix memory leak when running test campaign (#11072) 2016-08-25 14:37:46 -07:00
Igor Minar 501b83441d refactor(forms): remove FORM_PROVIDERS, FORM_DIRECTIVES, REACTIVE_FORM_PROVIDERS, REACTIVE_DIRECTIVES
All of these have been replaced by FormsModule and ReactiveFormsModule.
2016-08-25 13:29:03 -07:00
John Lindquist 6ef7a76e39 doc(form): updating example to avoid "TypeError: Converting circular structure to JSON" (#10184) 2016-08-25 11:14:40 -07:00
Kara 2b313e4979 feat(forms): add support for disabled controls (#10994) 2016-08-24 16:58:43 -07:00
Chuck Jazdzewski 39a2c39cef feat(compiler): Added "strictMetadataEmit" option to ngc (#10951)
ngc can now validate metadata before emitting to verify it doesn't
contain an error symbol that will result in a runtime error if
it is used by the StaticReflector.

To enable this add the section,

  "angularCompilerOptions": {
    "strictMetadataEmit": true
  }

to the top level of the tsconfig.json file passed to ngc.

Enabled metadata validation for packages that are intended to be
used statically.
2016-08-22 17:37:48 -07:00
Miško Hevery 8a5eb08672 fix(fakeAsync): have fakeAsync use Proxy zone. (#10797)
Closes #10503

It is possible for code in `beforeEach` to capture and fork a zone
(for example creating `NgZone` in `beforeEach`). Subsequently the code
in `it` may chose to do `fakeAsync`. The issue is that because the
code in `it` can use `NgZone` from the `beforeEach`. it effectively can
escape the `fakeAsync` zone. A solution is to run all of the test in
`ProxyZone` which allows a test to dynamically replace the rules at any
time. This allows the `beforeEach` to fork a zone, and then `it` to
retroactively became `fakeAsync` zone.
2016-08-19 12:10:53 -07:00
Kara 292ccf882a test(forms): update reactive form integration tests to use TestBed (#10908) 2016-08-17 17:10:56 -07:00
Kara 6fd5bc075d chore(forms): update forms labels (#10873) 2016-08-17 07:44:39 -07:00
Julie Ralph 4c9900dc3a refactor(testing): remove deprecated testing functions (#10832)
Remove TestComponentBuilder, addProviders, and withProviders. These
were deprecated in rc5 - see the changelog for update information.

Note - this does not actually remove the functions, but makes them
internal only. They will be removed from the codebase entirely
at a later time.
2016-08-15 21:40:37 -07:00
Kara 04c11bb749 test(forms): update template-driven form tests to use testbed (#10830) 2016-08-15 16:37:59 -07:00
Victor Savkin 60b10134df cleanup(platform): removed webworker and server deprecated apis (#10745) 2016-08-15 13:44:01 -07:00
Kara 7f6685e451 test(forms): refactor form model tests to three files (#10774) 2016-08-13 17:26:08 -07:00
Kara 79afcf0766 fix(forms): remove deprecated form provider functions (#10741)
BREAKING CHANGE:

The deprecated `provideForms()` and `disableDeprecatedForms()` functions have been removed. Please import the `FormsModule` or the `ReactiveFormsModule` from @angular/forms instead.
2016-08-12 15:32:47 -07:00
Kara 97f35714f7 feat(forms): add NgForm method that resets submit state (#10715) 2016-08-11 23:27:33 -07:00
Kara 5d59c6e80f docs(forms): fix reactive forms api examples (#10701) 2016-08-11 21:20:39 -07:00
Kara 7606c96c80 fix(forms): remove deprecated forms APIs (#10624)
BREAKING CHANGE:

The deprecated forms APIs in @angular/common have been removed. Please update to the new forms API in @angular/forms. See angular.io for more information.
2016-08-11 20:40:46 -07:00
Kara 2291929a15 feat(forms): add control status classes to form groups (#10667) 2016-08-11 09:01:09 -07:00
Miško Hevery b96869afd2 refactor(Type): merge Type and ConcreType<?> into Type<?> (#10616)
Closes #9729

BREAKING CHANGE:

`Type` is now `Type<T>` which means that in most cases you have to
use `Type<any>` in place of `Type`.

We don't expect that any user applications use the `Type` type.
2016-08-10 18:21:28 -07:00
Alex Eagle 6f4ee6101c chore(imports): don't import ExceptionHandler from facade (#10620)
This lets us skip src/facade/exception* when compiling modules other than core.
It prevents having many conflicting declarations
2016-08-10 15:55:18 -07:00
Kara fcafdff10b feat(forms): allow both patching and strict setting of values (#10537) 2016-08-05 13:35:17 -07:00
Jason Choi 99989f5d3f chore(facade): remove most facade/async functions 2016-08-05 12:26:28 -07:00
Chuck Jazdzewski 9925aa89dc fix(compiler): Report references to non-exported symbols.
Includes fixes to places now reported as errors.

Part of #8310
2016-08-03 15:42:38 -07:00
Patrice Chalin 6195a45ae2 fix(forms): export AbstractFormGroupDirective
Because
- `Form` is **exported** -- see line 30/31 of
`modules/@angular/forms/src/forms.ts`: i.e., <br>`export {Form} from
'./directives/form_interface'`; and
- Methods of `Form`, which are public, have an
`AbstractFormGroupDirective` parameter;
e.g.,<br>`Form.getFormGroup(dir: AbstractFormGroupDirective):
FormGroup`.

Then it makes sense for `AbstractFormGroupDirective` to be
public/exported too. In any case, if it isn't exported then the **API
docs for `Form` don't get generated properly.**
2016-08-03 15:33:29 -07:00
Misko Hevery 91c64d2b8d fix: missing export for validators 2016-08-02 12:12:15 -07:00
Tobias Bosch 8e6091de6c refactor(core): use `ngOnDestroy` in providers
Note about the addition of `beforeEach(fakeAsync(inject(…))))` in some tests:
`ApplicationRef` is now using `ngOnDestroy` and there is eager,
including all of its dependencies which contain `NgZone`.
The additional `fakeAsync` in `beforeEach` ensures that `NgZone`
uses the fake async zone as parent, and not the root zone.

BREAKING CHANGE (via deprecations):
- `ApplicationRef.dispose` is deprecated. Destroy the module that was
   created during bootstrap instead by calling `NgModuleRef.destroy`.
- `AplicationRef.registerDisposeListener` is deprecated.
   Use the `ngOnDestroy` lifecycle hook for providers or
   `NgModuleRef.onDestroy` instead.
- `disposePlatform` is deprecated. Use `destroyPlatform` instead.
- `PlatformRef.dipose()` is deprecated. Use `PlatformRef.destroy()`
   instead.
- `PlatformRef.registerDisposeListener` is deprecated. Use
  `PlatformRef.onDestroy` instead.
- `PlaformRef.diposed` is deprecated. Use `PlatformRef.destroyed`
  instead.
2016-08-02 11:23:26 -07:00
Kara d6d4568830 fix(forms): allow arrays as parents (#10440)
Closes #10432
2016-08-02 09:40:42 -07:00
Kara e0eea6c2f4 feat(forms): add invalid prop to abstract controls (#10439) 2016-08-01 18:41:25 -07:00
Kara 8d4499959a feat(forms): add get method for easy access to child controls (#10428) 2016-08-01 14:22:50 -07:00
Victor Berchet 28c4852cd6 refactor: remove ts2dart annotations 2016-08-01 11:34:51 -07:00
Marc Laval b48f7bcb8d fix(forms): normalize written value in NumberValueAccessor
Closes #10379
2016-07-29 18:18:30 +02:00
Tobias Bosch d0a95e35af refactor(testing): introduce new testing api to support ng modules
BREAKING CHANGE:
- deprecations:
  * `withProviders`, use `TestBed.withModule` instead
  * `addProviders`, use `TestBed.configureTestingModule` instead
  * `TestComponentBuilder`, use `TestBed.configureTestModule` / `TestBed.override...` / `TestBed.createComponent` instead.

Closes #10354
2016-07-29 04:47:18 -07:00
Kara 7c76a75452 fix(forms): update dirty before emitting value change (#10362)
Closes #5328
2016-07-28 14:25:33 -07:00
Kara 43349dd373 fix(forms): improve ngModel error messages (#10314) 2016-07-27 10:59:40 -07:00
Kara 0aba42ae5b fix(forms): throw error if wrong control container for reactive forms (#10286) 2016-07-26 10:08:46 -07:00
Tobias Bosch 46b212706b refactor(core): change module semantics
This contains major changes to the compiler, bootstrap of the platforms
and test environment initialization.

Main part of #10043
Closes #10164

BREAKING CHANGE:
- Semantics and name of `@AppModule` (now `@NgModule`) changed quite a bit.
  This is actually not breaking as `@AppModules` were not part of rc.4.
  We will have detailed docs on `@NgModule` separately.
- `coreLoadAndBootstrap` and `coreBootstrap` can't be used any more (without migration support).
  Use `bootstrapModule` / `bootstrapModuleFactory` instead.
- All Components listed in routes have to be part of the `declarations` of an NgModule.
  Either directly on the bootstrap module / lazy loaded module, or in an NgModule imported by them.
2016-07-26 07:04:10 -07:00