added AngularJs implementation