Try to go to Home Screen in case of screen failure.

This commit is contained in:
Gunther Brunner
2014-05-20 19:34:48 +09:00
parent 282ceab17a
commit c9cc28997c
2 changed files with 4 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
var FastImageRender = require('./fast-image-render').FastImageRender
module.exports = function DeviceScreenDirective($document, ScalingService, VendorUtil, PageVisibilityService, BrowserInfo) {
module.exports = function DeviceScreenDirective($document, ScalingService, VendorUtil, PageVisibilityService, BrowserInfo, $timeout) {
return {
restrict: 'E',
template: require('./screen.jade'),
@@ -116,7 +116,8 @@ module.exports = function DeviceScreenDirective($document, ScalingService, Vendo
}
scope.retryLoadingScreen = function () {
maybeLoadScreen()
scope.control.home()
$timeout(maybeLoadScreen, 1000)
}
function maybeLoadScreen() {