Example made by me to understand Angular.js operation