Make it works with AngularJs