My practice code using AngularJS