Sample code from the Angular Book