have http request working with factory and directive