Second sample with $httpBackend and promises added