1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-06 11:43:51 +00:00
Files
browser/libs/angular/src/directives/launch-click.directive.ts
Oscar Hinton ac49e594c1 Add standalone false to all non migrated (#14797)
Adds standalone: false to all components since Angular is changing the default to true and we'd rather not have the angular PR change 300+ files.
2025-05-15 10:44:07 -04:00

21 lines
618 B
TypeScript

import { Directive, HostListener, Input } from "@angular/core";
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
import { Utils } from "@bitwarden/common/platform/misc/utils";
@Directive({
selector: "[appLaunchClick]",
standalone: false,
})
export class LaunchClickDirective {
constructor(private platformUtilsService: PlatformUtilsService) {}
@Input("appLaunchClick") uriToLaunch = "";
@HostListener("click") onClick() {
if (!Utils.isNullOrWhitespace(this.uriToLaunch)) {
this.platformUtilsService.launchUri(this.uriToLaunch);
}
}
}