28 lines
752 B
JavaScript
28 lines
752 B
JavaScript
|
|
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=\"doClearServerUrl()\" value=\"Clear Server\"></input>';
|
|
|
|
pageRouteInit.push(function ($routeProvider, $locationProvider) {
|
|
$routeProvider.when('/example-ui/foo', {
|
|
template: tpl,
|
|
controller: PageFoo
|
|
});
|
|
});
|
|
|
|
function PageFoo($scope) {
|
|
$scope.doReboot = function ( path ) {
|
|
window.location.reload(true);
|
|
};
|
|
|
|
$scope.doClearServerUrl = function ( path ) {
|
|
FFSpaLoader.clearServerUrl(function(err) {
|
|
if (err) {
|
|
window.alert(err);
|
|
} else {
|
|
window.location.reload(true);
|
|
}
|
|
});
|
|
};
|
|
}
|