use angular window and http objects