Created
June 8, 2017 10:42
-
-
Save ak64th/b1d11d867246387f94e7f35e7a4f8273 to your computer and use it in GitHub Desktop.
Mock a jquery ajax request
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const loadData = function loadData(){ | |
let deferred = $.Deferred(); | |
deferred.then((data) => console.log(data)); | |
deferred.resolve(mockData); | |
return deferred; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment