Last active
August 29, 2015 14:01
-
-
Save aruss/997c92b499ea8a11ceae to your computer and use it in GitHub Desktop.
AngularJs snipptes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(app, $) { | |
app.directive('fooBar', function($timeout) { | |
return { | |
link: function(scope, elm, attrs) { | |
elm.on('public.action', function(e) { | |
// do stuff, call it by $('#elm').trigger('public.action'); | |
}); | |
// awesome directive is awesome | |
} | |
}; | |
}); | |
})(angular.module('someApp'), angular.element); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment