Working code with Learn Angular.js