angular/packages/core/src
Alex Rickabaugh fc034270ce fix(core): call ngOnDestroy on all services that have it (#23755)
Previously, ngOnDestroy was only called on services which were statically
determined to have ngOnDestroy methods. In some cases, such as with services
instantiated via factory functions, it's not statically known that the service
has an ngOnDestroy method.

This commit changes the runtime to look for ngOnDestroy when instantiating
all DI tokens, and to call the method if it's present.

Fixes #22466
Fixes #22240
Fixes #14818

PR Close #23755
2018-05-08 13:55:29 -07:00
..
change_detection refactor(ivy): make return value of define(Component|Directive|Pipe|Injector|Injectable) private (#23371) (#23383) 2018-04-14 20:40:14 -07:00
debug build: update npm dependencies (#19328) 2017-09-22 13:20:52 -07:00
di feat(ivy): support injection flags at runtime (#23518) 2018-04-25 13:26:58 -07:00
i18n docs(core): add docs for i18n tokens (#17920) 2017-12-05 21:56:43 -08:00
linker Revert "refactor(core): tree-shake application_module providers (#23477)" 2018-04-26 14:08:13 -07:00
metadata revert: refactor(ivy): make return value of define(Component|Directive|Pipe|Injector|Injectable) private (#23371) 2018-04-13 23:02:29 -07:00
profile fix(core): Update types for TypeScript nullability support (#15472) 2017-03-29 09:34:45 -07:00
reflection feat(core): support metadata reflection for native class types (#22356) 2018-02-22 13:22:03 -08:00
render docs: fix link texts 2017-11-01 15:44:59 -04:00
render3 fix(ivy): only generate TViews once per embedded template (#23385) 2018-05-01 10:27:40 -07:00
sanitization docs: remove all deprecated @stable jsdoc tags (#23210) 2018-04-10 21:49:32 -07:00
testability feat(core): add task tracking to Testability (#16863) 2018-03-14 08:48:48 -07:00
util refactor: ensure all 'TODO's are consistent (#23252) 2018-04-13 13:11:01 -07:00
view fix(core): call ngOnDestroy on all services that have it (#23755) 2018-05-08 13:55:29 -07:00
zone feat(core): add task tracking to Testability (#16863) 2018-03-14 08:48:48 -07:00
application_init.ts Revert "refactor(core): tree-shake application_module providers (#23477)" 2018-04-26 14:08:13 -07:00
application_module.ts Revert "refactor(core): tree-shake application_module providers (#23477)" 2018-04-26 14:08:13 -07:00
application_ref.ts Revert "refactor(core): tree-shake application_module providers (#23477)" 2018-04-26 14:08:13 -07:00
application_tokens.ts docs: fix link texts 2017-11-01 15:44:59 -04:00
change_detection.ts refactor(core): remove deprecated TrackByFn (#18757) 2017-08-18 13:23:46 -05:00
codegen_private_exports.ts refactor(compiler): don’t rely on global reflector (#16832) 2017-05-23 10:41:23 -06:00
console.ts refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
core.externs.js fix: don’t use the global ng at all with closure enhanced optimizations 2017-09-27 10:09:56 -07:00
core.ts fix(core): remove core animation import symbols (#22692) 2018-03-14 12:23:51 -07:00
core_private_export.ts feat(ivy): support injection even if no injector present (#23345) 2018-04-13 14:29:52 -07:00
core_render3_private_export.ts revert: refactor(ivy): make return value of define(Component|Directive|Pipe|Injector|Injectable) private (#23371) 2018-04-13 23:02:29 -07:00
di.ts refactor(ivy): make return value of define(Component|Directive|Pipe|Injector|Injectable) private (#23371) (#23383) 2018-04-14 20:40:14 -07:00
error_handler.ts docs: remove all deprecated @stable jsdoc tags (#23210) 2018-04-10 21:49:32 -07:00
errors.ts refactor(compiler): split compiler and core (#18683) 2017-08-16 17:58:53 -05:00
event_emitter.ts docs: remove all deprecated @stable jsdoc tags (#23210) 2018-04-10 21:49:32 -07:00
linker.ts refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
metadata.ts refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
platform_core_providers.ts refactor: core, http & platform-webworker to remove public private class separation (#19143) 2017-09-14 13:38:06 -04:00
render.ts refactor(core): use flags in Renderer2.setStyle instead of booleans (#15045) 2017-03-13 09:45:04 -07:00
type.ts docs: remove all deprecated @stable jsdoc tags (#23210) 2018-04-10 21:49:32 -07:00
util.ts fix(core): should check Zone existance when scheduleMicroTask (#20656) 2018-02-02 07:53:55 -08:00
version.ts docs: remove all deprecated @stable jsdoc tags (#23210) 2018-04-10 21:49:32 -07:00
zone.ts refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00