Helpful snippets of AngularJS code