Ctrl click ng-click open page in new tab
angularjs, angularjs-ng-click
Solution
Try this:
In HTML,
<div ng-click="gotoPageOrFunc($event)"></div>
In JS,
$scope.gotoPageOrFunc = function(event){
if (event.ctrlKey==1){
// Use windows.location or your link.
}else{
// Your actual functionalities.
}
}
Problem
Basically I want my app to open links in new tab/page when user holds down Ctrl (on linux windows), Cmd (on OSX). What is the way to go. Note: I cannot get rid of ng-click. the application uses it various method calls within scope.