2
0
Fork 0
es5-ff-spa-loader/example/www_static/js/controller/page-foo.js

23 lines
670 B
JavaScript
Raw Normal View History

2015-12-23 00:16:54 +00:00
2016-01-14 23:36:10 +00:00
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>';
2015-12-23 00:16:54 +00:00
pageRouteInit.push(function ($routeProvider, $locationProvider) {
$routeProvider.when('/example-ui/foo', {
2016-01-14 23:36:10 +00:00
template: tpl,
2015-12-23 00:16:54 +00:00
controller: PageFoo
});
});
2016-01-14 23:36:10 +00:00
function PageFoo($scope) {
$scope.doReboot = function ( path ) {
window.location.reload(true);
};
$scope.doClearServer = function ( path ) {
FFSpaLoader.clearServer();
window.location.reload(true);
};
2015-12-23 00:16:54 +00:00
}