Problem solving exercise using angular