
downgradeInjectable()
(#14037)
This makes it more consistent with the dynamic version of `upgrade` and makes it possible to share code between the dynamic and static versions. This commit also refactors the file layout, moving common and dynamic-specific files to `common/` and `dynamic/` directories respectively and renaming `aot/` to `static/`. Some private keys, used as AngularJS DI tokens, have also been renamed, but this should not affect apps, since these keys are undocumented and not supposed to be used externally. BREAKING CHANGE: Previously, `upgrade/static/downgradeInjectable` returned an array of the form: ```js ['dep1', 'dep2', ..., function factory(dep1, dep2, ...) { ... }] ``` Now it returns a function with an `$inject` property: ```js factory.$inject = ['dep1', 'dep2', ...]; function factory(dep1, dep2, ...) { ... } ``` It shouldn't affect the behavior of apps, since both forms are equally suitable to be used for registering AngularJS injectable services, but it is possible that type-checking might fail or that current code breaks if it relies on the returned value being an array.
Safari (7+), iOS (7+), Edge (14) and IE mobile (11) are tested on BrowserStack.
Angular
Angular is a development platform for building mobile and desktop web applications using Typescript/JavaScript (JS) and other languages.
Quickstart
Want to help?
Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our guidelines for contributing and then check out one of our issues in the hotlist: community-help.
Description
Languages
TypeScript
86.3%
JavaScript
8.5%
HTML
1.8%
Starlark
1.7%
CSS
1%
Other
0.6%