mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-26 20:56:48 +00:00
The auth directive binds to all elements with the auth attribute. It adds a click event that opens the login/register/password modal.
6 lines
179 B
CoffeeScript
6 lines
179 B
CoffeeScript
Darkswarm.directive 'auth', (AuthenticationService) ->
|
|
restrict: 'A'
|
|
link: (scope, elem, attrs) ->
|
|
elem.bind "click", ->
|
|
AuthenticationService.open '/' + attrs.auth
|