Skip to content

Instantly share code, notes, and snippets.

@wmbest2 wmbest2/example.html
Last active Dec 17, 2015

What would you like to do?
ctrl-click directive
<span ctrl-click="someFuncInMyController()">Hello World</span>
angular.module("Components", []).directive("ctrlClick", function() {
return {
restrict: 'A',
link: function($scope, element, attrs) {
element.bind('click', function(e) {
if (e.metaKey) {
} else {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.