Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for new Angular control flow #3451

Open
mihilion opened this issue Nov 12, 2024 · 1 comment
Open

Adding support for new Angular control flow #3451

mihilion opened this issue Nov 12, 2024 · 1 comment

Comments

@mihilion
Copy link

mihilion commented Nov 12, 2024

Pug Version: 3.0.2

Node Version: 18.20.3

Input JavaScript Values

pug.renderFile('input.pug', {
  whatIsIt: 'language',
});

Input Pug

@if (pugSupportsNewAngularControlFlow) {
  h1 I Love Pug
  p It's a great #{whatIsIt}
} @else {
  p Can you please add support for new angular control flow?
}    

Expected HTML

@if (pugSupportsNewAngularControlFlow) {
  <h1>I Love Pug</h1>
  <p>It's a great language</p>
} @else {
  <p>Can you please add support for new angular control flow?</p>
}  

Actual HTML

unexpected text "@if (" - line 1:1

Additional Comments

Angular introduced new control flow, which works in html templates: https://angular.dev/guide/templates/control-flow and
It would be great if pug could support it, with proper syntax highliting in IntelliJ (that part is perhaps on IntelliJ side, but pug needs to support the syntax first).

@muneeb26
Copy link

It would be really good to have this, we also want to use control flow statements but are blocked by pug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants