Skip to content

Instantly share code, notes, and snippets.

@emgeee
Last active December 12, 2015 20:16
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 emgeee/7ade032ad0e8220a1310 to your computer and use it in GitHub Desktop.
Save emgeee/7ade032ad0e8220a1310 to your computer and use it in GitHub Desktop.
angular-decorator-example.js
app.config(function ($provide) {
$provide.decorator('Widget', function ($delegate) {
$delegate.prototype.sing = function () {
console.log('LA LA LA LA LA')
}
return $delegate
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment