Is Https
The IsHttpsPipe
is an Angular pipe that checks if a given string represents a valid HTTPS URL.
We also provide
isHttps
utility. Usage
import {IsHttpsPipe} from 'ngx-lift';
@Component({
standalone: true,
imports: [IsHttpsPipe],
template: `
<p>{{ 'https://www.example.com' | isHttps }}</p>
<!-- Output: true -->
<p>{{ 'http://www.example.com' | isHttps }}</p>
<!-- Output: false -->
@if(url | isHttps) {
<child-component [url]="url" />
}
`
})
export class IsHttpsPipeDemoComponent {
url = 'https://url-to-be-passed-into-a-child-component-only-when-url-matches-https.com';
}