var tpl = '
Welcome to the foo.
{{message}}
'; pageRouteInit.push(function ($routeProvider, $locationProvider) { $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(); }); }; }