sample codes using AngularJs