Skip to content

feat(compiler): support tagged template literals in expressions - #59947

Closed
mmalerba wants to merge 1 commit into
angular:mainfrom
mmalerba:tag-temp
Closed

mmalerba wants to merge 1 commit into
angular:mainfrom
mmalerba:tag-temp

Conversation

@mmalerba

@mmalerba mmalerba commented Feb 13, 2025 •

Copy link
Copy Markdown
Contributor

Adds support for using tagged template literals in Angular templates.

Ex:

@Component({
  template: '{{ greet`Hello, ${name()}` }}'
})
export class MyComp {
  name = input();

  greet(strings: TemplateStringsArray, name: string) {
    return strings[0] + name + strings[1] + '!';
  }
}

@angular-robot angular-robot Bot added the area: compiler Issues related to `ngc`, Angular's template compiler label Feb 13, 2025
@ngbot ngbot Bot added this to the Backlog milestone Feb 13, 2025
@mmalerba
mmalerba force-pushed the tag-temp branch 2 times, most recently from a76d534 to f7bcefe Compare February 14, 2025 22:31
@angular-robot angular-robot Bot added the area: language-service Issues related to Angular's VS Code language service label Feb 18, 2025
@angular-robot angular-robot Bot added the detected: feature PR contains a feature commit label Feb 18, 2025
@mmalerba
mmalerba marked this pull request as ready for review February 18, 2025 22:48
@mmalerba mmalerba changed the title WIP: feat(compiler): support tagged template literals in expressions feat(compiler): support tagged template literals in expressions Feb 18, 2025
@pullapprove
pullapprove Bot requested a review from kirjs February 18, 2025 22:51
@mmalerba
mmalerba requested a review from crisbeto February 18, 2025 22:52
@mmalerba
mmalerba force-pushed the tag-temp branch 2 times, most recently from 8997309 to e06bfcb Compare February 19, 2025 00:51
Comment thread packages/compiler-cli/src/ngtsc/typecheck/src/expression.ts Outdated
Comment thread packages/compiler-cli/src/ngtsc/typecheck/src/expression.ts Outdated
Comment thread packages/language-service/test/quick_info_spec.ts Outdated
Comment thread packages/core/test/acceptance/integration_spec.ts Outdated
Comment thread packages/compiler/src/template/pipeline/src/ingest.ts Outdated
@mmalerba
mmalerba force-pushed the tag-temp branch 4 times, most recently from c53efa9 to c25a715 Compare February 21, 2025 23:11
@mmalerba
mmalerba force-pushed the tag-temp branch 2 times, most recently from 627bfdd to b5f68a4 Compare February 28, 2025 17:41
@mmalerba mmalerba added the target: major This PR is targeted for the next major release label Feb 28, 2025
Adds support for using tagged template literals in Angular templates.

Ex:
```
@component({
  template: '{{ greet`Hello, ${name()}` }}'
})
export class MyComp {
  name = input();

  greet(strings: TemplateStringsArray, name: string) {
    return strings[0] + name + strings[1] + '!';
  }
}
```
@mmalerba mmalerba added the action: merge The PR is ready for merge by the caretaker label Feb 28, 2025
@mmalerba
mmalerba removed the request for review from kirjs February 28, 2025 18:00
@mmalerba

Copy link
Copy Markdown
Contributor Author

This PR was merged into the repository by commit 51b8ff2.

The changes were merged into the following branches: main

@angular-automatic-lock-bot

Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Mar 31, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: compiler Issues related to `ngc`, Angular's template compiler area: language-service Issues related to Angular's VS Code language service detected: feature PR contains a feature commit target: major This PR is targeted for the next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants