Code snippets for learning AngularJS