updated AngularJS snippets