angular/packages/compiler-cli/test/ngtsc
Kristiyan Kostadinov 8be2c48b7c feat(core): implement new block syntax (#51891)
Switches the syntax for blocks from `{#block}{/block}` to `@block {}` based on the feedback from the community.

Read more about the decision-making process in our blog: https://blog.angular.io/meet-angulars-new-control-flow-a02c6eee7843

The existing block types changed in the following ways:

**Conditional blocks:**
```html
<!-- Before -->
{#if cond}
  Main content
  {:else if otherCond}
    Else if content
  {:else}
    Else content
{/if}

<!-- After -->
@if (cond) {
  Main content
} @else if (otherCond) {
  Else if content
} @else {
  Else content
}
```

**Deferred blocks**
```html
<!-- Before -->
{#defer when isLoaded}
  Main content
  {:loading} Loading...
  {:placeholder} <icon>pending</icon>
  {:error} Failed to load
{/defer}

<!-- After -->
@defer (when isLoaded) {
  Main content
} @loading {
  Loading...
} @placeholder {
  <icon>pending</icon>
} @error {
  Failed to load
}
```

**Switch blocks:**
```html
<!-- Before -->
{#switch value}
  {:case 1}
    One
  {:case 2}
    Two
  {:default}
    Default
{/switch}

<!-- After -->
@switch (value) {
  @case (1) {
    One
  }

  @case (2) {
    Two
  }

  @default {
    Default
  }
}
```

**For loops**
```html
<!-- Before -->
{#for item of items; track item}
  {{item.name}}
  {:empty} No items
{/for}

<!-- After -->
@for (item of items; track item) {
  {{item.name}}
} @empty {
  No items
}
```

PR Close #51891
2023-09-26 09:10:04 -07:00
..
doc_extraction feat(compiler): extract docs via exports (#51828) 2023-09-20 18:34:55 +02:00
BUILD.bazel feat(compiler): initial skeleton for API doc extraction (#51733) 2023-09-18 12:29:19 +02:00
component_indexing_spec.ts refactor(compiler-cli): update to use new file-system interfaces (#40281) 2021-01-08 09:34:44 -08:00
env.ts feat(compiler): extract docs via exports (#51828) 2023-09-20 18:34:55 +02:00
extended_template_diagnostics_spec.ts refactor(compiler-cli): remove leftover _extendedTemplateDiagnostics flag (#44920) 2022-02-01 18:24:10 +00:00
host_directives_spec.ts fix(compiler-cli): libraries compiled with v16.1+ breaking with Angular framework v16.0.x (#50714) 2023-06-14 16:27:59 +02:00
imports_spec.ts ci: migrate windows job to GHA (#51010) 2023-07-17 14:51:36 +00:00
incremental_error_spec.ts perf(compiler-cli): detect semantic changes and their effect on an incremental rebuild (#40947) 2021-03-08 08:41:19 -08:00
incremental_semantic_changes_spec.ts feat(compiler): add support for compile-time required inputs (#49468) 2023-03-20 13:10:30 +01:00
incremental_spec.ts perf(compiler-cli): optimize NgModule emit for standalone components (#49837) 2023-04-17 14:51:58 +00:00
incremental_typecheck_spec.ts refactor: make all imports compatible with ESM/CJS output. (#43431) 2021-10-01 18:28:45 +00:00
local_compilation_spec.ts fix(compiler-cli): allow non-array imports for standalone component in local compilation mode (#51819) 2023-09-20 12:24:54 +02:00
ls_typecheck_helpers_spec.ts fix(language-service): generate forwardRef for same file imports (#48898) 2023-02-02 13:40:17 -08:00
monorepo_spec.ts test(compiler-cli): move testing utils to separate package (#39594) 2020-11-17 11:59:56 -08:00
ngtsc_spec.ts feat(core): implement new block syntax (#51891) 2023-09-26 09:10:04 -07:00
scope_spec.ts feat(compiler-cli): standalone types imported into NgModule scopes (#44973) 2022-03-29 13:06:26 -07:00
sourcemap_utils.ts test: update source-map tests to account for source-map breaking change (#46888) 2022-07-19 09:40:54 -07:00
standalone_spec.ts refactor(compiler): generate arrow functions for setClassMetadata calls (#51637) 2023-09-25 09:27:26 -07:00
template_mapping_spec.ts fix(compiler-cli): correct incomplete escaping (#51557) 2023-08-29 19:48:25 +00:00
template_typecheck_spec.ts feat(core): implement new block syntax (#51891) 2023-09-26 09:10:04 -07:00
util.ts refactor(compiler): Add a new helper method getPrimaryAngularDecorator. (#47180) 2022-08-22 10:39:42 -07:00
xi18n_spec.ts test(compiler): fix deprecation warning (#45285) 2022-03-07 11:36:47 -08:00