2
0
Fork 0

Fixed websql init async,cleanup options,add tested browsers

This commit is contained in:
Willem 2016-01-16 18:24:37 +01:00
parent ec4e9a0dae
commit e5e2dfc56f
5 changed files with 261 additions and 182 deletions

View file

@ -1,7 +1,7 @@
var tpl = '<div><h2>Foo</h2><p>Welcome to the foo.</p></div>';
tpl += '<input type=\"button\" class=\"btn btn-default\" ng-click=\"doReboot()\" value=\"Reboot\"></input>';
tpl += '<input type=\"button\" class=\"btn btn-default\" ng-click=\"doClearServer()\" value=\"Clear Server\"></input>';
tpl += '<input type=\"button\" class=\"btn btn-default\" ng-click=\"doClearServerUrl()\" value=\"Clear Server\"></input>';
pageRouteInit.push(function ($routeProvider, $locationProvider) {
$routeProvider.when('/example-ui/foo', {
@ -15,8 +15,13 @@ function PageFoo($scope) {
window.location.reload(true);
};
$scope.doClearServer = function ( path ) {
FFSpaLoader.clearServer();
window.location.reload(true);
$scope.doClearServerUrl = function ( path ) {
FFSpaLoader.clearServerUrl(function(err) {
if (err) {
window.alert(err);
} else {
window.location.reload(true);
}
});
};
}

View file

@ -1,8 +1,8 @@
'use strict';
document.title = 'FF-Spa-Loader Example';
document.title = 'FFSpaLoader Example';
var serverUrl = window.FFServerUrl;
console.log('FF provided serverUrl: '+serverUrl);
console.log('FFExample provided serverUrl \"'+serverUrl+'\"');
$(document.createElement('div')).attr('id', 'wrapper').appendTo($('body'));
$(document.createElement('div')).attr('ng-controller', 'ApplicationController').attr('ng-include', '\''+serverUrl+'/example-ui/thtml/header\'').appendTo($('#wrapper'));

View file

@ -6,13 +6,10 @@
</head>
<body><%- inline %>
<script>
FFSpaLoader.options.debug = true;
FFSpaLoader.options.server.urlPath = '/static/spa-client-resources';
FFSpaLoader.options.cache.factory = FFSpaLoader.autoSelectCache();
FFSpaLoader.start(function() {
console.log('FFExample.bootstrap angular');
angular.bootstrap( $('body'), ['exampleUI']);
});
FFSpaLoader.options.debug.enable = true;
FFSpaLoader.options.boot.angular.modules.push('exampleUI');
FFSpaLoader.options.server.assets = '/static/spa-client-resources';
FFSpaLoader.start();
</script>
</body>
</html>