Skip to content
Permalink
main
Switch branches/tags

Commits on Jun 9, 2022

  1. docs: update example hero ID (#46304)

    The hero ID "11" does not correspond to any hero from the example mock heroes list described at https://angular.io/tutorial/toh-pt2#create-mock-heroes. ID 12 seems to be the more fitting ID to get the hero with name "Dr. Nice".
    
    PR Close #46304
    sten-bone authored and jessicajaniuk committed Jun 9, 2022
  2. fix(common): allow null in ngComponentOutlet (#46280)

    `ngComponentOutlet` already handles null/undefined values, but the types don't reflect that. These changes update the types.
    
    Fixes #45716.
    
    PR Close #46280
    crisbeto authored and jessicajaniuk committed Jun 9, 2022

Commits on Jun 8, 2022

  1. docs(forms): fix FormRecord usage notes (#46299)

    FormRecod usegaesNotes were like it accetps simple object like a FormBuilder.
    PR Close #46299
    Totati authored and jessicajaniuk committed Jun 8, 2022
  2. build: exclude bazel commits from release notes (#46310)

    @angular/bazel has been deprecated since v10, and is no longer supported. We
    don't need to mention fixes/features for Bazel in the release notes.
    
    PR Close #46310
    alxhub committed Jun 8, 2022
  3. docs(router): Complete QueryParamsHandling documentation (#46286)

    `QueryParamsHandling` has a third possibility which is the default behavior,
    and it was not documented until now.
    
    PR Close #46286
    PowerKiKi authored and alxhub committed Jun 8, 2022
  4. docs: remove azure builder reference (#46285)

    This builder is not compatible with newer versions of the Angular CLI.
    
    See angular/angular-cli#23255 for more context
    
    PR Close #46285
    alan-agius4 authored and alxhub committed Jun 8, 2022

Commits on Jun 7, 2022

  1. build: update dev-infra shared code to latest revision (#46291)

    Updates dev-infra to the latest revision. This revision supports
    for custom release prechecks and performs the release build
    before the staging, verifying integrity later. This has various
    benefits for stability and making the less less relucant to build
    issues that mess up a previously-merged staging PR.
    
    PR Close #46291
    devversion authored and alxhub committed Jun 7, 2022
  2. build(docs-infra): update dependencies in docs examples `package.json…

    …` files (#46248)
    
    This is a follow-up to #46227 to update the dependency version ranges in
    the docs examples `package.json` files.
    
    PR Close #46248
    gkalpak authored and alxhub committed Jun 7, 2022
  3. refactor(common): include locale extra data in closure locale file (#…

    …46167)
    
    The recent update to CLDR 41 highlighted (internally) that some time
    formats have changed to rely on locale-specific day periods. In
    particular the `zh_TW` (or canonical: `zh_Hant`) has changed some
    time formats/patterns from the universal `AM/PM` symbols (`a`) to `B`.
    
    The `b`/`B` symbols rely on locale-specific day period rules. This data
    is only extracted from CLDR into the so-called extra locale data that
    Angular provides.
    
    To fix this, and to be able to reverse the internal workaround that
    doesn't allow us to use the actual CLDR 41 data here, we always provide
    the locale extra data when conditonally loading CLDR data based on
    `goog.LOCALE`.
    
    This will result in additional payload cost that locale-specific JS
    bundles have to pay, but the only alternative would be to break
    Angular's `b`/`B` symbol support in favor of falling back to `AM/PM`
    rules (similar to how Closure Libray itself does it).
    
    For our external users (something I want to note here), they will be
    able to load the extra data easily (like it was possible before).
    Angular has some good erroring if the extra data is required. Most of
    our users will always use the global locale files anyway (the Angular
    CLI always uses them). These come with the extra data by default.
    
    Resources:
    
    - unicode-org/cldr@0d53832
    - https://github.com/unicode-org/cldr/blob/0d538327d1ea2a31d1614d8989007b97a3ee5021/common/main/zh_Hant.xml
    - https://github.com/angular/angular/blob/6a4353cb40227330be2a5685adca485a8b8e8a0b/packages/common/src/i18n/format_date.ts#L609-L639
    - https://cldr.unicode.org/translation/date-time/date-time-symbols
    - https://cs.github.com/angular/angular-cli/blob/4be7cdce8283a177b92594bb7b34b4718d0a39c3/packages/angular_devkit/build_angular/src/utils/i18n-options.ts?q=%22locales%2Fglobal%22#L23
    
    PR Close #46167
    devversion authored and alxhub committed Jun 7, 2022

Commits on Jun 6, 2022

  1. test: add an internal helper to populate document.head before a test (#…

    …46250)
    
    This commit reuses the logic of the `withBody` helper and implements the `withHead` based on it.The helper method is useful for tests that rely on a certain tags being present in document's `<head>` element.
    
    PR Close #46250
    AndrewKushnir authored and alxhub committed Jun 6, 2022
  2. refactor(core): rename a file to avoid old terminology (to avoid ment…

    …ioning render3) (#46250)
    
    This commit renames the packages/private/testing/src/render3.ts -> packages/private/testing/src/utils.ts to avoid using the `render3` term as it used to differentiate VE and Ivy, which is no longer relevant.
    
    PR Close #46250
    AndrewKushnir authored and alxhub committed Jun 6, 2022
  3. docs: mark version 13 as LTS in releases guide (#46268)

    Verson 13 is now in LTS.
    
    PR Close #46268
    alan-agius4 authored and alxhub committed Jun 6, 2022
  4. docs: add i18n video to the overview page (#46273)

    PR Close #46273
    mgechev authored and alxhub committed Jun 6, 2022
  5. build: lock file maintenance (#46270)

    PR Close #46270
    renovate-bot authored and alxhub committed Jun 6, 2022
  6. docs: removed outdated migration documentation (#46257)

    Fixes #46236
    
    PR Close #46257
    phalgunv authored and alxhub committed Jun 6, 2022
  7. docs: annotate more APIs with the @developerPreview tag (#46234)

    This commit updates a few more standalone-related APIs with the `@developerPreview` tag.
    
    PR Close #46234
    AndrewKushnir authored and alxhub committed Jun 6, 2022
  8. refactor(core): export missing util function (#46274)

    This commit exports the `isHostComponentStandalone` function and also changes a location where it's imported from. The function was moved recently in a different PR, which caused some conflicts after merging other PRs that relied on the old structure.
    
    PR Close #46274
    AndrewKushnir authored and alxhub committed Jun 6, 2022
  9. docs: fix duplicate in CHANGELOG (#46267)

    PR Close #46267
    wellWINeo authored and alxhub committed Jun 6, 2022
  10. docs: change wrong alters to callouts (#46262)

    change the alerts present in the docs to callouts so
    that their header can be properly rendered
    (since alters don't support have headers)
    
    PR Close #46262
    dario-piotrowicz authored and alxhub committed Jun 6, 2022
  11. refactor(core): fix eaither typo in transitiveScopesFor comment (#46261)

    fix the 'eaither' typo (instead of 'either') in the tsdoc comment
    for the transitiveScopesFor function
    
    PR Close #46261
    dario-piotrowicz authored and alxhub committed Jun 6, 2022
  12. fix(bazel): update API extractor version (#46259)

    `@angular/bazel` currently uses an older version of `@microsoft/api-extractor` which is causing downstream issues in Components. These changes bump up to a version that has a fix.
    
    Context: angular/components#25027
    
    PR Close #46259
    crisbeto authored and alxhub committed Jun 6, 2022
  13. docs: fix missing closing div in http page (#46258)

    PR Close #46258
    sniperwolf authored and alxhub committed Jun 6, 2022
  14. docs: fix typo in the CHANGELOG (#46255)

    Fixes a type made in the CHANGELOG.md under the 14.0.0 at router release notes
    PR Close #46255
    JelleBruisten authored and alxhub committed Jun 6, 2022
  15. fix(forms): allow FormBuilder.group(...) to accept optional fields. (#…

    …46253)
    
    Consider the case in which `FormBuilder` is used to construct a group with an optional field:
    
    ```
    const controls = { name: fb.control('') };
    const foo: FormGroup<{
      name: FormControl<string | null>;
      address?: FormControl<string | null>;
    }> = fb.group<{
      name: FormControl<string | null>;
      address?: FormControl<string | null>;
    }>(controls);
    ```
    
    Today, with fully strict TypeScript settings, the above will not compile:
    
    ```
    Types of property 'controls' are incompatible.
    Type '{ name: FormControl<string | null>; address?: FormControl<FormGroup<SubFormControls> | null | undefined> | undefined; }' is not assignable to type '{ name: FormControl<string | null>; address?: FormGroup<SubFormControls> | undefined; }'.
    ```
    
    Notice that the `fb.group(...)` is calculating the following type for address: `address?: FormControl<FormGroup<string|null>`. This is clearly wrong -- an extraneous `FormControl` has been added!
    
    This is coming from the calculation of the result type of `fb.group(...)`. In the type definition, if we cannot detect the outer control type, [we assume it's just an unwrapped value, and automatically wrap it in `FormControl`](https://github.com/angular/angular/blob/14.0.0/packages/forms/src/form_builder.ts#L66).
    
    Because the optional `{address?: FormControl<string|null>}` implicitly makes the RHS have type `FormControl<string|null>|undefined`, [the relevant condition is not satisfied](https://github.com/angular/angular/blob/14.0.0/packages/forms/src/form_builder.ts#L55). In particular, the condition expects just `FormGroup<T>`, not `FormGroup<T>|undefined`. So we assume `T` is a value type, and it gets wrapped with `FormControl`.
    
    The solution is to add the cases where `undefined` is included in the union type when detecting which control `T` is (if any).
    
    PR Close #46253
    dylhunn authored and alxhub committed Jun 6, 2022
  16. refactor(core): add helpful info in the pipe not found error message (#…

    …46247)
    
    Add info to the pipe not found error message so to give some help to the developer for
    resolving the problem more efficiently
    
    (Note: this change also distinguishes the case in which the hosting component is standalone)
    
    PR Close #46247
    dario-piotrowicz authored and alxhub committed Jun 6, 2022
  17. refactor(core): split RuntimeError unit test up (#46239)

    split the single RuntimeError utils test testing about the correct
    formatting of errors in multiple separate unit tests (for better
    granularity and clearness)
    
    PR Close #46239
    dario-piotrowicz authored and alxhub committed Jun 6, 2022
  18. refactor(core): improve the runtime errors formatting (#46239)

    the formatted error messages always include a period separator between the
    provided error message and the find-more suffix, this is not always
    desirable as it may add periods when they shoud not be, so improve the
    formatting by checking and applying the period only if the provided message
    doesn't end with a character which already represents a separator
    
    additionally also improve the formatting by trimming the provided error
    message
    
    note that such trimming needs to be performed before the separator check
    so that for example an error message like `"some error! "` doesn't produce
    `"some error! ."` but it successfully produces "some error!"
    
    PR Close #46239
    dario-piotrowicz authored and alxhub committed Jun 6, 2022
  19. docs(forms): Amend the FormGroupDirective docs to indicate it also wo…

    …rks with FormRecord. (#46235)
    
    It is currently unclear which directive to use for FormRecord. This commit amends the docs to explicitly state that the group directives can and should be used with records.
    
    PR Close #46235
    dylhunn authored and alxhub committed Jun 6, 2022
  20. refactor(core): improve code around element validation (#46175)

    improve code regarding element validation by creating a new file
    exporting validation functions and not exporting utils previously
    globally available
    
    PR Close #46175
    dario-piotrowicz authored and alxhub committed Jun 6, 2022

Commits on Jun 3, 2022

  1. build: lock file maintenance (#46104)

    PR Close #46104
    renovate-bot authored and alxhub committed Jun 3, 2022
  2. feat(upgrade): more closely align UpgradeModule#bootstrap() with `a…

    …ngular.bootstrap()` (#46214)
    
    Previously, [UpgradeModule#bootstrap()][1], while being a replacement
    for and accepting the same arguments as [angular.bootstrap()][2], did
    not return the same value as `angular.bootstrap()` (i.e. the AngularJS
    injector in most cases). This made it less straight forward to migrate
    some usecases that relied on the return value of `.bootstrap()`. The
    work-around was to access the injector via [UpgradeModule#$injector][3]
    (after the app had been bootstrapped with `UpgradeModule#bootstrap()`).
    
    This commit addresses this by ensuring `UpgradeModule#bootstrap()`
    returns the same value as `angular.bootstrap()`, making it easier to
    replace the latter with the former.
    
    [1]: https://angular.io/api/upgrade/static/UpgradeModule#bootstrap
    [2]: https://docs.angularjs.org/api/ng/function/angular.bootstrap
    [3]: https://angular.io/api/upgrade/static/UpgradeModule#%24injector
    
    Fixes #46211
    
    PR Close #46214
    gkalpak authored and alxhub committed Jun 3, 2022
  3. test(upgrade): add some tests for UpgradeModule (#46214)

    Add some tests for the `UpgradeModule` class and its members.
    
    PR Close #46214
    gkalpak authored and alxhub committed Jun 3, 2022
Older