adding sample code of AngularJS book