• Pete Bacon Darwin's avatar
    fix(ivy): ensure that `LOCALE_ID` is set after app initializers (#34830) · e0ad9ecd
    Pete Bacon Darwin authored
    Before ivy it was possible to configure a mutable service value
    in an application initializer (by providing an `APP_INITIALIZER`)
    that could be read in the provider of `LOCALE_ID`. This is a common
    scenario if you wanted to load the locale id asynchronously from
    an HTTP request for instance.
    
    When using the ivy, the runtime needs to be told what the current
    locale is, which is done by calling the `setLocaleId()` function with
    the value injected by the `LOCALE_ID` token. Previously this was
    being done before the application initializers were run, which meant
    that the `LOCALE_ID` provider was being executed before the
    app initializers had a chance to get a new value for it.
    
    Now this initalization of the locale for the ivy runtime is done after the
    application initializers have been run.
    
    Closes #34701
    
    PR Close #34830
    e0ad9ecd
Name
Last commit
Last update
.circleci Loading commit data...
.devcontainer Loading commit data...
.github Loading commit data...
.vscode Loading commit data...
aio Loading commit data...
docs Loading commit data...
integration Loading commit data...
modules Loading commit data...
packages Loading commit data...
scripts Loading commit data...
third_party Loading commit data...
tools Loading commit data...
.bazelignore Loading commit data...
.bazelrc Loading commit data...
.clang-format Loading commit data...
.editorconfig Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
.nvmrc Loading commit data...
BUILD.bazel Loading commit data...
CHANGELOG.md Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
CONTRIBUTING.md Loading commit data...
LICENSE Loading commit data...
README.md Loading commit data...
WORKSPACE Loading commit data...
browser-providers.conf.js Loading commit data...
gulpfile.js Loading commit data...
karma-js.conf.js Loading commit data...
package.json Loading commit data...
protractor-perf.conf.js Loading commit data...
shims_for_IE.js Loading commit data...
test-events.js Loading commit data...
test-main.js Loading commit data...
tslint.json Loading commit data...
yarn.lock Loading commit data...
yarn.lock.readme.md Loading commit data...