2
@Component({
  selector: 'some-component',
  templateUrl: `./app/component/stuff/component.html?v=${new Date().getTime()}`,
  styleUrls: [`./app/component/stuff/component.css?v=${new Date().getTime()}`]
})

Can I use like above in Angular 7?

I need to clear the browser cache. I am referred this answer and but this for angular 2.

Application hosted on the IIS

So far I have tried the below answers but no output.

1)Cache busting after deploying Angular 8 application

2)How to prevent Browser cache on Angular 2 site?

3)Clear browser cache in Angular

Murugan
  • 95
  • 2
  • 12

1 Answers1

2

The only thing you need to do is making sure that the index.html is not cached (or for a very short time) See How to disable caching of single page application HTML file served through IIS?. All other resources are packaged by angular and cache busted by default.

kvetis
  • 6,682
  • 1
  • 28
  • 48