Created
December 31, 2015 13:24
-
-
Save yngvebn/f7aee2c1f828c27733d2 to your computer and use it in GitHub Desktop.
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
function getMacAddress() { | |
var myFakeResponse = {'0000000000000000'} | |
var deferred = $q.defer(); | |
var promise = TvStateService.getNetworkStatus(); | |
promise.then( | |
function success(response) { | |
deferred.resolve(response); | |
}, | |
function error(e){ | |
deferred.resolve(myFakeResonse); | |
}); | |
return deferred; | |
} |
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
function getMacAddress() { | |
return $q(function(resolve, reject){ | |
TvStateService | |
.getNetworkStatus() | |
.then(resolve, function(e){ resolve({'0000000000000000'}); }); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment