Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/danielkucal/ngx-sanitizer

A set of useful pipes to bypass Angular security check for trusted resources.
https://github.com/danielkucal/ngx-sanitizer

Last synced: about 1 month ago
JSON representation

A set of useful pipes to bypass Angular security check for trusted resources.

Awesome Lists containing this project

README

        

# Ngx-Sanitizer
## Installation
1. `npm i ngx-sanitizer`
2. Import `NgxSanitizerModule` into your module(s).

## About
This library provides a set of simple yet useful pipes:
- `SafeUrlPipe`
- `SafeHtmlPipe`
- `SafeStylePipe`
- `SafeScriptPipe`
- `SafeResourceUrlPipe`

that can be used to say Angular we trust the data we provide, e.g.:
```typescript
@Component({
template: `

`,
})
export class SomeComponent {
someUntrustedHtml = 'I am Strong!';
}
```

##### NOTE: Please, make sure you made yourself familiar with [Angular Security Guide](https://angular.io/guide/security) and you know which resources can be trusted.