angular/packages
Kristiyan Kostadinov 54ceed53e2 refactor(compiler): add support for host directives (#46868)
This is the compile-time implementation of the `hostDirectives` feature plus a little bit of runtime code to illustrate how the newly-generated code will plug into the runtime. It works by creating a call to the new `ɵɵHostDirectivesFeature` feature whenever a directive has a `hostDirectives` field. Afterwards `ɵɵHostDirectivesFeature` will patch a new function onto the directive definition that will be invoked during directive matching.

For example, if we take the following definition:

```ts
@Directive({
  hostDirectives: [HostA, {directive: HostB, inputs: ['input: alias']}]
})
class MyDir {}
```

Will compile to:

```js
MyDir.ɵdir = ɵɵdefineComponent({
  features: [ɵɵHostDirectivesFeature([HostA, {
    directive: HostB,
    inputs: {
      input: "alias"
    }
  }])]
});
```

The template type checking is implemented during directive matching by adding the host directives applied on the host to the array of matched directives whenever the host is matched in a template.

Relates to #8785.

PR Close #46868
2022-08-22 16:00:35 -07:00
..
animations Revert "fix(animations): fix stagger timing not handling params (#47208)" (#47222) 2022-08-22 14:53:20 -07:00
bazel feat(core): support TypeScript 4.8 (#47038) 2022-08-16 16:02:47 +00:00
benchpress build: clean up references to old master branch (#45856) 2022-05-04 16:23:33 -07:00
common fix(common): support density descriptors with 2+ decimals (#47197) 2022-08-22 10:49:46 -07:00
compiler refactor(compiler): add support for host directives (#46868) 2022-08-22 16:00:35 -07:00
compiler-cli refactor(compiler): add support for host directives (#46868) 2022-08-22 16:00:35 -07:00
core refactor(compiler): add support for host directives (#46868) 2022-08-22 16:00:35 -07:00
docs docs: fix packages\docs\di\di.md (#46704) 2022-07-08 17:53:39 +00:00
elements test(elements): add a test for standalone element creation (#46475) 2022-07-18 18:20:27 +00:00
examples refactor(core): drop all .ngfactory and .ngsummary imports (#44957) 2022-02-07 15:31:49 -08:00
forms fix(forms): Correctly infer FormBuilder types involving [value, validators] shorthand in more cases. (#47034) 2022-08-17 11:32:15 +00:00
language-service refactor(language-service): Create helper methods for manipulating object and array ASTs. (#47181) 2022-08-22 10:44:21 -07:00
localize build: update babel dependencies to v7.18.9 (#46883) 2022-07-19 16:04:09 +00:00
misc/angular-in-memory-web-api build: update angular version of in-memory-web-api (#46344) 2022-06-13 17:40:09 +00:00
platform-browser feat(platform-browser): add isEmpty method to the TransferState class (#46915) 2022-07-22 09:17:47 +00:00
platform-browser-dynamic feat(bazel): speed up dev-turnaround by bundling types only when packaging (#45405) 2022-04-21 11:09:39 -07:00
platform-server feat(platform-server): support document reference in render functions (#47032) 2022-08-04 13:37:54 -07:00
private/testing refactor(core): drop unused fields from the RootContext (#46806) 2022-08-05 09:58:06 -07:00
router feat(router): Add UrlTree constructor to public API (#47186) 2022-08-22 10:44:52 -07:00
service-worker refactor(service-worker): formatting of index.ts (#47044) 2022-08-18 12:09:10 -07:00
upgrade fix(compiler): inputs/outputs incorrectly parsed in jit mode (#46813) 2022-07-13 21:26:50 +00:00
zone.js feat(core): support TypeScript 4.8 (#47038) 2022-08-16 16:02:47 +00:00
BUILD.bazel build: Auto-gen tsec tsconfig files (#43440) 2021-09-17 17:17:34 +00:00
circular-deps-test.conf.js build: ignore type only imports/exports for circular dependency checks (#47017) 2022-08-18 12:06:09 -07:00
empty.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
goog.d.ts refactor(core): replace references to goog.LOCALE with goog.getLocale() (#43089) 2021-08-10 10:35:26 -07:00
license-banner.txt build: bump license year (#44590) 2022-01-04 12:05:25 -08:00
README.md
system.d.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
tsconfig-build.json build: enable useUnknownInCatchVariables (#44679) 2022-02-01 18:17:29 +00:00
tsconfig-legacy-saucelabs.json build: bundle spec files for saucelabs legacy job (#44281) 2021-11-30 11:56:04 -05:00
tsconfig-test.json build: switch devmode output to es2015 (#44505) 2022-01-05 23:20:20 +00:00
tsconfig-tsec-base.json build: update tsconfigs to use ES2020 as target and module (#43431) 2021-10-01 18:28:42 +00:00
tsconfig.json build: enable useUnknownInCatchVariables (#44679) 2022-02-01 18:17:29 +00:00
tsec-exemption.json build: Enable tsec checks for critical packages. (#43108) 2021-09-13 14:45:57 -07:00
types.d.ts build: update to jasmine 4.0 (#45558) 2022-04-11 16:25:28 +00:00

Angular

The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.

Usage information and reference details can be found in Angular documentation.

License: MIT