Files
openfoodnetwork/app/assets/javascripts/darkswarm/directives/auth.js.coffee
Maikel Linke 2a9e35355e Add auth directive to use AuthenticationService
The auth directive binds to all elements with the auth attribute. It
adds a click event that opens the login/register/password modal.
2016-03-18 16:46:29 +11:00

6 lines
179 B
CoffeeScript

Darkswarm.directive 'auth', (AuthenticationService) ->
restrict: 'A'
link: (scope, elem, attrs) ->
elem.bind "click", ->
AuthenticationService.open '/' + attrs.auth