Skip to content

Instantly share code, notes, and snippets.

@TweededBadger
Last active April 18, 2023 07:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TweededBadger/ae0efe18fdab666a922a to your computer and use it in GitHub Desktop.
Save TweededBadger/ae0efe18fdab666a922a to your computer and use it in GitHub Desktop.
// ...
angular.module('SvgMapApp').directive('region', [function () {
return {
restrict: 'A',
scope: true,
link: function (scope, element, attrs) {
scope.elementId = element.attr("id");
scope.regionClick = function () {
alert(scope.elementId);
};
}
}
}]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment