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
Tobias Bosch
ecdaded25f
feat(core): introduce `NgModuleRef.destroy` and call `ngOnDestroy` on all providers
2016-08-02 11:23:26 -07:00
Tobias Bosch
c161ed415d
feat(core): support `ngOnDestroy` on providers of a directive.
...
Such providers also become eager as they will be instantiated
anyways on destruction.
2016-08-02 11:23:26 -07:00
Tobias Bosch
ff3b71f7b3
refactor(core): collect lifecycle hooks for all injectable classes
2016-08-02 11:23:26 -07:00
Tobias Bosch
16cc9b46aa
fix(fake_async): share zone between `beforeEach` and `it`
...
This is needed for the case if a `beforeEach` instantiates
`NgZone`and the `it` uses
`TestComponentBuilder.createFakeAsync`.
Otherwise the `NgZone` will use the root zone as parent,
and `TestComponentBuilder.createFakeAsync` will always return
undefined as `tick` does not forward promises created
under the zone of `NgZone`.
2016-08-02 11:23:26 -07:00
Michael
3ce11ed58c
docs(pipes): update I18nSelectPipe API documentation ( #10449 )
2016-08-02 10:59:07 -07:00
Marc Laval
7db75fa361
test: reactivate some of the disabled tests in Edge ( #10450 )
2016-08-02 10:58:03 -07:00
Kara
d6d4568830
fix(forms): allow arrays as parents ( #10440 )
...
Closes #10432
2016-08-02 09:40:42 -07:00
Misko Hevery
a55d796c4b
fix: Better error message in case of unknown property binding
2016-08-02 09:28:04 -07:00
Misko Hevery
73f02c7861
fix: throw useful error on missing platform module.
2016-08-02 09:28:04 -07:00
Misko Hevery
8c8754e573
chore: add browserNoRouter test running mode
2016-08-02 09:28:04 -07:00
Sam Herrmann
c977a906b3
docs(cheatsheet): add moduleId ( #10095 )
2016-08-02 07:34:04 -07:00
Kara
e0eea6c2f4
feat(forms): add invalid prop to abstract controls ( #10439 )
2016-08-01 18:41:25 -07:00
vsavkin
3e377f520e
fix(router): make an outlet to unregister itself when it is removed from the dom
2016-08-01 16:56:38 -07:00
vsavkin
8dc82a0080
fix(router): fix offline compilation by exporting provideLocationStrategy
2016-08-01 16:23:28 -07:00
vsavkin
4624a35845
docs(router): fixes api docs
2016-08-01 16:23:28 -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
2dfc9c653b
refactor: dart
2016-08-01 11:34:51 -07:00
Victor Berchet
106db0aba8
refactor: IS_DART === false
2016-08-01 11:34:51 -07:00
Victor Berchet
28c4852cd6
refactor: remove ts2dart annotations
2016-08-01 11:34:51 -07:00
Victor Berchet
13c8211065
fix: String.split(str, n) stops after n separator ( #10408 )
2016-08-01 11:33:35 -07:00
Victor Berchet
e73d0511cf
fix(TemplateParser): report empty expression ( #10391 )
...
fixes #3754
2016-08-01 11:24:49 -07:00
Matias Niemelä
e18626b7a2
fix(core): ensure ngFor only inserts/moves/removes elements when necessary ( #10287 )
...
Closes #9960
Closes #7239
Closes #9672
Closes #9454
Closes #10287
2016-08-01 11:09:52 -07:00
Hans
4df7b1cfbc
chore: fixes some issues that happen with closure compiler. ( #10392 )
2016-08-01 09:47:49 -07:00
Tobias Bosch
93ade740e2
fix(router): configure DI correctly when using the old `provideRouter` function
2016-08-01 02:35:41 -07:00
Tobias Bosch
a46437c57d
refactor(core): fix `bootstrapModule` regarding zones and initializers ( #10383 )
...
This makes `bootstrapModuleFactory` wait for promises
returned by `APP_INITIALIZER`s, also making `bootstrapModuleFactory` async.
I.e. now `bootstrapModule` and `bootstrapModuleFactory` behave in the
same way.
This ensures that all code from module instantiation, to creating
`ApplicationRef`s as well as calling `APP_INITIALIZERS` is run
in the Angular zone.
This also moves the invocation of the initializers from the `ApplicationRef`
constructor into the `bootstrapModuleFactory` call, allowing initializers
to get a hold of `ApplicationRef` (see #9101 ).
Fixes #9101
Fixes #10363
Fixes #10205
2016-08-01 02:12:59 -07:00
Tobias Bosch
633c7d1ebe
refactor(core): cleanup unused `NgZone` factory
...
This factory was only used when using `coreBootstrap` / `coreLoadAndBoostrap`
which is not supported any more.
2016-08-01 02:12:59 -07:00
Cody-Nicholson
251953218c
fix(http): URLSearchParams.clone propagate the QueryEncoder ( #9900 )
2016-07-30 19:01:20 -07:00
Suguru Inatomi
0d6cc17252
fix(UrlParser): stop setting default value 'true' ( #10399 )
2016-07-30 14:34:03 -07:00
Zhicheng Wang
6134320f16
refactor(http): rewrite for readable & efficient.
2016-07-29 21:30:28 -07:00
Zhicheng Wang
7f647822bd
fix(http): headers should be case-insensitive.
...
fixes #9452
spec at https://tools.ietf.org/html/rfc2616
2016-07-29 21:30:15 -07:00
Victor Berchet
e34a04d2ad
feat(xmb/xtb): support dtd
2016-07-29 14:18:34 -07:00
Victor Berchet
44093905e2
refactor(test): refine types
2016-07-29 13:53:13 -07:00
Victor Berchet
3e2900f74b
refactor(i18n): move code around
2016-07-29 13:40:58 -07:00
Victor Berchet
11fd2eccec
refactor: fix merge glitches
2016-07-29 13:40:58 -07:00
Victor Berchet
0eee1d5de3
feat(i18n): xtb serializer
2016-07-29 13:40:58 -07:00
Victor Berchet
1b77604ee2
refactor(compiler): re-arrange files
2016-07-29 13:40:58 -07:00
Victor Berchet
cc5cfe87c3
feat(i18n): xmb serializer
2016-07-29 13:40:58 -07:00
Victor Berchet
48f230a951
feat(I18nAst): introduce an intermediate AST
2016-07-29 13:40:58 -07:00
Victor Berchet
2be50bdbb0
refactor(i18n): message extractor
...
fixes #8802
2016-07-29 13:40:58 -07:00
Victor Berchet
f7258ea52a
test(HtmlAst): add a serializer
2016-07-29 13:40:58 -07:00
Victor Berchet
28e8b2faab
feat(ICU): extract ICU messages
2016-07-29 13:40:58 -07:00
vsavkin
3c3e9ddb10
feat(router): add a validation to make sure pathMatch is set correctly
2016-07-29 12:27:43 -07:00
vsavkin
5162fb6d52
feat(router): add isActive to router
2016-07-29 12:27:43 -07:00
vsavkin
2fdb39e60a
feat(router): activateroute should expose its route config
2016-07-29 12:27:43 -07:00
Marc Laval
43c71ae103
fix(platform-browser): IEMobile is badly detected when testing ( #10382 )
2016-07-29 10:05:12 -07:00
Marc Laval
f0bd528d77
test(http): fix Blob creation for Android <= 4.3
...
Closes #10377
2016-07-29 18:20:09 +02:00
Marc Laval
b48f7bcb8d
fix(forms): normalize written value in NumberValueAccessor
...
Closes #10379
2016-07-29 18:18:30 +02:00
Chuck Jazdzewski
763ca60f5b
feat(compiler): Support default parameters in static reflector ( #10370 )
...
Closes : #10369
2016-07-29 09:10:45 -07: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