Working example illustrated in Pro Angular by Adam Freeman