Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
copyLinkToClipboard() {
const successful = Clipboard.copy(this.getUrl());
if (successful) {
const translate = this.languageService.translate;
const title = translate.instant('igo.geo.routingForm.dialog.copyTitle');
const msg = translate.instant('igo.geo.routingForm.dialog.copyMsgLink');
this.messageService.success(msg, title);
}
}
: ' (' + this.formatDistance(step.distance) + ')';
activeRouteDirective =
activeRouteDirective +
indent +
(localCnt + 1).toLocaleString() +
'. ' +
instruction +
distance +
'\n';
localCnt++;
});
const directionsBody =
summary + wayPointList + '\n' + url + '\n\n' + activeRouteDirective;
const successful = Clipboard.copy(directionsBody);
if (successful) {
const translate = this.languageService.translate;
const title = translate.instant('igo.geo.routingForm.dialog.copyTitle');
const msg = translate.instant('igo.geo.routingForm.dialog.copyMsg');
this.messageService.success(msg, title);
}
}
copyTextToClipboard(textArea) {
const successful = Clipboard.copy(textArea);
if (successful) {
const translate = this.languageService.translate;
const title = translate.instant(
'igo.context.shareMap.dialog.copyTitle'
);
const msg = translate.instant('igo.context.shareMap.dialog.copyMsg');
this.messageService.success(msg, title);
}
}