[Angular] Respect --no-bracket-spacing for interpolations
See original GitHub issueSome might disagree that this should be added, but (possibly unfortunately) the option --no-bracket-spacing
already exists. Respecting it would, in my opinion, make a code base more consistent.
JSX also seems to ignore this option, although in its case no spaces are added (an issue was opened and closed regarding this: #1097). Why no spaces for JSX but spaces in Angular? I suppose that people don’t really use Angular together with JSX so there shouldn’t be any inconsistency there, but still, why the inconsistency in terms of decisions (space vs. no space)?
Prettier 1.15.2 Playground link
--parser angular
--no-bracket-spacing
Input:
<div> {{ x + 2}} </div>
Output:
<div>{{ x + 2 }}</div>
Expected behavior:
<div>{{x + 2}}</div>
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Displaying values with interpolation - Angular
Interpolation refers to embedding expressions into marked up text. By default, interpolation uses the double curly braces {{ and }} as delimiters.
Read more >Alternative (square bracket) syntax - Apache FreeMarker Manual
The square bracket and the default (angle bracket) syntax are mutually exclusive within a template; they can't be mixed. If the template uses ......
Read more >What is Interpolation in AngularJS ? - GeeksforGeeks
In this article, we will know about Interpolation in AngularJS, along with understanding the basic implementation. In AngularJS ...
Read more >Understanding Angular property binding and interpolation
Use brackets: When binding properties, the square bracket is always expected, and omitting it will lead to Angular treating it like a regular ......
Read more >Interpolation - Pug
String Interpolation, Escaped ¶ ... Pug is smart enough to figure out where the expression ends, so you can even include } without...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Same request but for JSX: #2651
It’s been 2 years with just 1 👍. Time to close.