diff --git a/src/ui/public/share/directives/share_object_url.js b/src/ui/public/share/directives/share_object_url.js index ee65c86345d44..b606c251d09ac 100644 --- a/src/ui/public/share/directives/share_object_url.js +++ b/src/ui/public/share/directives/share_object_url.js @@ -67,7 +67,11 @@ app.directive('shareObjectUrl', function (Private, Notifier) { }; $scope.getUrl = function () { - return $location.absUrl(); + let url = $location.absUrl(); + if ($scope.shareAsEmbed) { + url = url.replace('?', '?embed=true&'); + } + return url; }; $scope.$watch('getUrl()', updateUrl);