// Angular imports // import { Component, Inject } from '@angular/core'; import { downgradeComponent } from '@angular/upgrade/static'; declare const angular: angular.IAngularStatic; @Component({ selector: 'fb-clean-cache', templateUrl: './clean-cache.component.html' }) export class CleanCacheComponent { constructor( @Inject('CacheService') cacheService: fb.ICacheService) { cacheService.cleanCache(); window.location.href = window.location.href.split('#')[0]; } } // Angular downgrade //// angular.module('fasit') .directive('fbCleanCache', downgradeComponent({ component: CleanCacheComponent, inputs: [], outputs: [] }) as angular.IDirectiveFactory);