var tpl = '

Foo

Welcome to the foo.

'; tpl += ''; tpl += ''; 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); } }); }; }