Testing and learning angularjs