I have a login modal in a directive which I am trying to make it work using link function and jquery but it doesn't seem to work.
This is the login button
<button login-modal type="button" class="btn">Sign In</button>This is the smaller version of the login modal view
<div id="loginModal" class="modal fade" role="dialog"></div>This is the login directive
angular .module('app') .directive('loginModal', ['$scope', loginModalDirective]); function loginModalDirective($scope) { return { restrict: 'E', templateUrl: 'template/loginmodal.view.html', link: function(scope, elem, attr) { elem.on('click', function() { jQuery("#loginModal").modal(); }); } }; }
elem.on('click'use theng-clickdirective.