Skip to main content
Version: Next 🚧

SourceIcon

The SourceIconPipe transforms a collection of strings into a corresponding icon class based on the source name. If the collection is empty or undefined, it returns a default icon class.

warning

Caution: This pipe is deprecated and will be removed in the future.

API​

transform(collection: string[]): string
ParameterTypeDescription
collectionstring[]An array of strings representing the collection.

Returns​

string - A string representing the icon class.

Usage​

import { SourceIconPipe } from '@sinequa/atomic-angular';
import { FAIcon } from '@sinequa/ui';

@Component({
selector: 'document-icon',
imports: [FAIcon, SourceIconPipe],
template: `
<FaIcon [faClass]="source | sourceIcon"></i>
`
})
export class DocumentIconComponent {
source = ['web/example'];
}