My dashboard is a grid with many tiles with each tile having a link to a different page.
Every time I click the link it creates a new tab even for the link which was opened previously.
**How do I suppress the opening of new tabs for the links which are already opened in the browser using Angular ?
Note: The external links should not open on the tab where dashboard is currently opened**
I have used the following code in my script file
$scope.openInNewWindow = function(url, $event) {
$window.open(url);
$event.preventDefault();
}
And, I call it using :
<a class="ui-button ui-button-stretch" ng-href="{{link.url}}" ng-click="openInNewWindow(link.url, $event)">