Text
slugify
Preserves Unicode letters, numbers and combining marks; normalizes NFC and lowercases by default.
Use it in your component
Standalone component
import { Component } from '@angular/core';
import { SlugifyPipe } from 'extra-pipe';
@Component({
standalone: true,
imports: [SlugifyPipe],
template: `{{ 'Café & Angular tools' | slugify: {foldLatinAccents: true} }}`,
})
export class ExampleComponent {
}
Template
{{ 'Café & Angular tools' | slugify: {foldLatinAccents: true} }}
Try it live.
The output below runs the packed library. Edit data, not code.
Use double quotes for text, or a number, array, object or null.
Ordered parameters: options. Locale is controlled separately.
This pipe has no locale override.
Live template data
readonly value = "Café & Angular tools";
readonly parameter0 = {"foldLatinAccents":true} as const;
{{ value | slugify: parameter0 }}
Rendered output
cafe-angular-tools