Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/angular/angular.git. Pull mirroring updated .
  1. Feb 17, 2022
  2. Feb 16, 2022
  3. Feb 15, 2022
  4. Feb 12, 2022
  5. Feb 11, 2022
  6. Feb 10, 2022
  7. Feb 09, 2022
    • Renovate Bot's avatar
      a01ae487
    • Renovate Bot's avatar
      build: update scorecard action dependencies to 230611d (#45012) · 3769de2c
      Renovate Bot authored
      PR Close #45012
      3769de2c
    • Amer Yousuf's avatar
      docs(forms): improve email validator directive docs (#45014) · 835b3267
      Amer Yousuf authored
      PR Close #45014
      835b3267
    • Andrew Kushnir's avatar
      fix(core): `ViewContainerRef.createComponent` should consult module injector... · 92cf9fbe
      Andrew Kushnir authored
      fix(core): `ViewContainerRef.createComponent` should consult module injector when custom one is provided (#44966)
      
      Before Ivy, it was only possible to call the `ViewContainerRef.createComponent` function with the ComponentFactory as the first argument. An instance of a `ComponentFactory` resolved via `ComponentFactoryResolver` contained a reference to an `NgModule` where the component is declared. As a result, the component maintained a DI connection with the module injector tree (by retrieving an instance of `NgModuleRef` internally), even when the custom injector was provided (we try to find a token in a custom injector first and consult module injector after that).
      
      With Ivy, we expanded the `ViewContainerRef.createComponent` function API to support direct references to the Component classes without going through the factory resolution step. As a result, there was no connection to the NgModule that declares the component. Thus, if you provide a custom injector, this is the only injector that is taken into account.
      
      This commit updates the logic for the factory-less case to try retrieving an instance of an `NgModuleRef` using the DI tree which `ViewContainerRef` belongs to. The `NgModuleRef` instance is then used to get a hold of a module injector tree. This brings the factory-less and factory-based logic to more consistent state.
      
      Closes #44897.
      
      PR Close #44966
      92cf9fbe
    • Kristiyan Kostadinov's avatar
      perf(compiler): chain element start/end instructions (#44994) · 09f0254b
      Kristiyan Kostadinov authored
      In templates with several levels of nested nodes, it's common for several `elementStart`/`elementEnd` instructions to show up in a row which can be optimized away.
      
      These changes add chaining support for `elementStart`, `elementEnd`, `elementContainerStart` and `elementContainerEnd` to shave off some bytes when possible.
      
      PR Close #44994
      09f0254b
    • Kristiyan Kostadinov's avatar
      refactor(compiler): rework instruction generation logic for improved flexibility (#44994) · 7b9490ad
      Kristiyan Kostadinov authored
      Previously the logic for generating chained instructions was somewhat rigid, because we had to collect all of the calls ahead of time and then call one of the chained instruction helpers. This doesn't work for something like `elementStart`, because we have to descend into other elements that could add to the chain.
      
      These changes refactor the code so that we collect the list of instructions in a flat array and we do the chaining only once at the end when we have the entire instruction set for the code block.
      
      The new approach has the advantage of being (almost) entirely configuration-based via the `CHAINABLE_INSTRUCTIONS` array and being more flexible in allowing us to chain instructions that span across elements.
      
      PR Close #44994
      7b9490ad
    • Esteban Gehring's avatar
      docs(common): mark lifecycle methods as nodoc (#45017) · f0e82c8a
      Esteban Gehring authored
      PR Close #45017
      f0e82c8a
    • Dylan Hunn's avatar
      release: cut the v13.2.2 release (#45018) · 7a47add2
      Dylan Hunn authored
      PR Close #45018
      13.2.2
      7a47add2
  8. Feb 08, 2022
    • Alan Cohen's avatar
      docs: fix command to clear cache on Windows (#44988) · 7bc4dbd7
      Alan Cohen authored
      PR Close #44988
      7bc4dbd7
    • Andrew Kushnir's avatar
      refactor(core): drop all `.ngfactory` and `.ngsummary` imports (#44957) · d40ac205
      Andrew Kushnir authored
      This commit updates various places in the repo (mostly tests/examples) to drop all `.ngfactory` and `.ngsummary` imports as they are no longer needed in Ivy.
      
      PR Close #44957
      d40ac205
    • Shai Reznik's avatar
      docs: add Cost-Effective Angular Testing (#44969) · 1368f58b
      Shai Reznik authored
      to resources
      PR Close #44969
      1368f58b
    • Kristiyan Kostadinov's avatar
      fix(forms): incorrectly keeping track of ngModel with ngFor inside a form (#40459) · b75e90f8
      Kristiyan Kostadinov authored
      When an `NgModel` is created within a `form`, it receives an `NgControl` based on its `name`, but
      the control doesn't get swapped out if the name changes. This can lead to problems if the `NgModel`
      is part of an `ngFor`, because the name can change based on its position in the list and a new
      control can be defined with the same name, leading us to having multiple directives pointing to
      the same control. For example, if we start off with a list like :
      
      ```
      [0, 1, 2]; -> [NgModel(0), NgModel(1), NgModel(2)]
      ```
      
      Then we remove the second item:
      
      ```
      [0, 2]; -> [NgModel(0), NgModel(2)]
      ```
      
      And finally, if we decide to add an item to the end of the list, we'll already have a control for
      index 2, causing the list to look like:
      
      ```
      [0, 2, 3]; -> [NgModel(0), NgModel(2), NgModel(2)]
      ```
      
      These changes fix the issue by removing the old control when the `name` of the directive changes.
      
      Fixes #38465.
      Fixes #37920.
      
      PR Close #40459
      b75e90f8
    • iRealNirmal's avatar
      refactor(forms): update `PatternValidator` to inherit `AbstractValidatorDirective` (#44887) · 3919ee37
      iRealNirmal authored
      This commit updates the `PatternValidator` class to inherit `AbstractValidatorDirective` to make it conistent with other validators.
      
      Closes angular#42267
      
      PR Close #44887
      3919ee37
    • JoostK's avatar
      fix(compiler): allow banana-in-a-box bindings to end with non-null assertion (#37809) · 37af6abb
      JoostK authored
      For two-way-bindings that use the banana-in-a-box syntax, the compiler
      synthesizes an event assignment expression from the primary expression.
      It is valid for the primary expression to be terminated by the non-null
      operator, however naive string substitution is used for the synthesized
      expression, such that the `!` would immediately precede the `=` token,
      resulting in the valid `!=` operator token. The expression would still
      parse correctly but it doesn't implement the proper semantics, resulting
      in incorrect runtime behavior.
      
      Changing the expression substitution to force a space between the
      primary expression and the assignment avoids this mistake, but it
      uncovers a new issue. The grammar does not allow for the LHS of an
      assignment to be the non-null operator, so the synthesized expression
      would fail to parse. To alleviate this, the synthesized expression is
      parsed with a special parser flag to allow for this syntax.
      
      Fixes #36551
      
      PR Close #37809
      37af6abb
    • Alan Agius's avatar
      ci: group all scorecard action dependencies (#44998) · 604a67f0
      Alan Agius authored
      With this change we group all the scorecard action dependencies so that Renovate opens a single PR.
      
      PR Close #44998
      604a67f0