Code examples from PACKT AngluarJs book