Best Practice Snippets for angularjs