Sample Code for AngularJs