banner for unsupported browsers

This commit is contained in:
Matias Alejo Garcia 2014-05-12 12:00:25 -03:00
commit 030e10a3b6
2 changed files with 29 additions and 4 deletions

View file

@ -42,6 +42,9 @@ angular
templateUrl: 'backup.html',
validate: true
})
.when('/unsupported', {
templateUrl: 'unsupported.html'
})
.otherwise({
templateUrl: '404.html'
});
@ -57,8 +60,14 @@ angular
})
.run(function($rootScope, $location) {
$rootScope.$on('$routeChangeStart', function(event, next, current) {
if ((!$rootScope.wallet || !$rootScope.wallet.id) && next.validate) {
$location.path('signin');
if (!util.supports.data) {
$location.path('unsupported');
}
else {
if ((!$rootScope.wallet || !$rootScope.wallet.id) && next.validate) {
$location.path('signin');
}
}
});
});