Support Angular inline styles as single template literal (#15968)
This commit is contained in:
1 parent
4b1965ae45
commit
2fe7f4193a
5 files changed
+231
-9
No files matched your search
@@ -0,0 +1,32 @@
|
||||
#### Support Angular inline styles as single template literal (#15968 by @sosukesuzuki)
|
||||
|
||||
[Angular v17](https://blog.angular.io/introducing-angular-v17-4d7033312e4b) supports single string inline styles.
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
```ts
|
||||
// Input
|
||||
@Component({
|
||||
template: `<div>...</div>`,
|
||||
styles: `h1 { color: blue; }`,
|
||||
})
|
||||
export class AppComponent {}
|
||||
|
||||
// Prettier stable
|
||||
@Component({
|
||||
template: `<div>...</div>`,
|
||||
styles: `h1 { color: blue; }`,
|
||||
})
|
||||
export class AppComponent {}
|
||||
|
||||
// Prettier main
|
||||
@Component({
|
||||
template: `<div>...</div>`,
|
||||
styles: `
|
||||
h1 {
|
||||
color: blue;
|
||||
}
|
||||
`,
|
||||
})
|
||||
export class AppComponent {}
|
||||
|
||||
```
|
||||
Reference in new issue
Block a user