adding examples from Mastering Web Application Development with AngularJS