2
Fork 0

Added mobile example app

This commit is contained in:
Willem 2016-01-24 21:38:21 +01:00
parent 4fbf705ae5
commit cf364fc418
26 changed files with 187 additions and 61 deletions

View file

@ -0,0 +1,10 @@
pageRouteInit.push(function ($routeProvider, $locationProvider) {
$routeProvider.when('/example-ui/bar', {
templateUrl: window.serverUrl+'/example-ui/thtml/bar',
controller: PageFoo
});
});
function PageFoo($scope, $http) {
}

View file

@ -0,0 +1,42 @@
var tpl = '<div><h2>Foo</h2><p>Welcome to the foo.</p></div>';
tpl += '<input type=\"button\" class=\"btn btn-default\" ng-click=\"doReload()\" value=\"Reload\"></input>';
tpl += '<input type=\"button\" class=\"btn btn-default\" ng-click=\"doClearServerUrl()\" value=\"Clear Server Url\"></input>';
tpl += '<input type=\"button\" class=\"btn btn-default\" ng-click=\"doClearCache()\" value=\"Clear Cache\"></input>';
tpl += '<p>{{message}}</p>';
pageRouteInit.push(function ($routeProvider, $locationProvider) {
$routeProvider.when('/example-ui/foo', {
template: tpl,
controller: PageFoo
});
});
function PageFoo($scope) {
$scope.message = '';
$scope.doReload = function () {
window.location.reload(true);
};
$scope.doClearServerUrl = function () {
FFSpaLoader.clearServerUrl(function(err) {
if (err) {
$scope.message = 'Error: '+err;
} else {
$scope.message = 'Cleared server url';
}
$scope.$apply();
});
};
$scope.doClearCache = function () {
FFSpaLoader.clearCache(function(err) {
if (err) {
$scope.message = 'Error: '+err;
} else {
$scope.message = 'Cleared cache';
}
$scope.$apply();
});
};
}

View file

@ -0,0 +1,10 @@
pageRouteInit.push(function ($routeProvider, $locationProvider) {
$routeProvider.when('/example-ui', {
template: '<div><h2>Example UI Index</h2><p>Welcome make yourself at home.</p></div>',
controller: PageIndex
});
});
function PageIndex($scope, $http) {
}