pageRouteInit.push(function ($routeProvider, $locationProvider) { var tpl = '

Foo

Welcome to the foo.

'; tpl += ''; tpl += ''; tpl += ''; tpl += '

{{message}}

'; $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(); }); }; }