How to: decorate a function.

From:
https://egghead.io/lessons/angularjs-create-a-scope-decorator