Polish Round 1 (#2396)
This commit is contained in:
parent
cf2c43d390
commit
02b002d81a
197 changed files with 1233 additions and 1751 deletions
17
UI/Web/src/app/_pipes/safe-style.pipe.ts
Normal file
17
UI/Web/src/app/_pipes/safe-style.pipe.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import { inject } from '@angular/core';
|
||||
import { Pipe, PipeTransform } from '@angular/core';
|
||||
import { DomSanitizer } from '@angular/platform-browser';
|
||||
|
||||
@Pipe({
|
||||
name: 'safeStyle',
|
||||
standalone: true
|
||||
})
|
||||
export class SafeStylePipe implements PipeTransform {
|
||||
private readonly sanitizer: DomSanitizer = inject(DomSanitizer);
|
||||
constructor(){}
|
||||
|
||||
transform(style: string) {
|
||||
return this.sanitizer.bypassSecurityTrustStyle(style);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue