2
Fork 0

Fixed example

This commit is contained in:
Willem 2016-01-15 00:36:10 +01:00
parent 95a90b51fb
commit 838714aac1
9 changed files with 73 additions and 45 deletions

View file

@ -1,10 +1,22 @@
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>';
pageRouteInit.push(function ($routeProvider, $locationProvider) {
$routeProvider.when('/example-ui/foo', {
template: '<div><h2>Foo</h2><p>Welcome to the foo.</p></div>',
template: tpl,
controller: PageFoo
});
});
function PageFoo($scope, $http) {
function PageFoo($scope) {
$scope.doReboot = function ( path ) {
window.location.reload(true);
};
$scope.doClearServer = function ( path ) {
FFSpaLoader.clearServer();
window.location.reload(true);
};
}