angular version of this service. v1.0