angular/packages/compiler-cli/test/compliance/test_cases
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
..
r3_compiler_compliance refactor(compiler): add support for host directives (#46868) 2022-08-22 16:00:35 -07:00
r3_view_compiler refactor(compiler): add support for host directives (#46868) 2022-08-22 16:00:35 -07:00
r3_view_compiler_bindings refactor(compiler): add support for host directives (#46868) 2022-08-22 16:00:35 -07:00
r3_view_compiler_di/di refactor(compiler): add support for host directives (#46868) 2022-08-22 16:00:35 -07:00
r3_view_compiler_directives refactor(compiler): add support for host directives (#46868) 2022-08-22 16:00:35 -07:00
r3_view_compiler_i18n refactor(compiler): add support for host directives (#46868) 2022-08-22 16:00:35 -07:00
r3_view_compiler_input_outputs refactor(compiler): add support for host directives (#46868) 2022-08-22 16:00:35 -07:00
r3_view_compiler_listener refactor(compiler): add support for host directives (#46868) 2022-08-22 16:00:35 -07:00
r3_view_compiler_providers refactor(compiler): add support for host directives (#46868) 2022-08-22 16:00:35 -07:00
r3_view_compiler_styling refactor(compiler): add support for host directives (#46868) 2022-08-22 16:00:35 -07:00
r3_view_compiler_template refactor(compiler): add support for host directives (#46868) 2022-08-22 16:00:35 -07:00
source_mapping refactor(compiler): add support for host directives (#46868) 2022-08-22 16:00:35 -07:00
BUILD.bazel test: refactor compiler-cli compliance test to work on windows (#45431) 2022-03-25 12:18:34 -07:00
list_golden_update_rules.ts refactor(compiler-cli): use semver range checking for partial versions (#39847) 2020-12-04 10:26:17 -08:00
test_case_schema.json test(compiler-cli): improve compliance test compile mode filtering (#39939) 2020-12-07 16:21:04 -08:00