Skip to content

SocialPathPipe

Methods

transform()

The transform() method generates a full network path based on the network name and configuration.

Parameters:

  • network: The name of the social network.

Returns:

  • The full network path.

Usage

example.component.html
<img [src]="network | socialPath" alt="Social Network Icon">

This example snippet represents an Angular component HTML template.

It displays a social network icon as an image using the <img> tag.

The image source URL is dynamically set based on the network variable, which is transformed using the socialPath pipe.

Providing alternative text for the image, the alt attribute ensures accessibility by offering a descriptive text representation.