Skip to content

Instantly share code, notes, and snippets.

@dennis-8
Created August 14, 2018 10:42
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 dennis-8/ffe0d50160bfbfe94b15ad3e1ea7a8bd to your computer and use it in GitHub Desktop.
Save dennis-8/ffe0d50160bfbfe94b15ad3e1ea7a8bd to your computer and use it in GitHub Desktop.
AngularJS component - check if method callback is present
https://stackoverflow.com/a/38914917
@dennis-8
Copy link
Author

dennis-8 commented Aug 14, 2018

In your controller inject $attrs and then you can do:

if($attrs.onRemove) { 
//do something 
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment