Skip to content

Instantly share code, notes, and snippets.

@VikashSaharan1
Created June 29, 2019 08:13
Show Gist options
  • Save VikashSaharan1/115a92ddccd6e3b30024416275da1749 to your computer and use it in GitHub Desktop.
Save VikashSaharan1/115a92ddccd6e3b30024416275da1749 to your computer and use it in GitHub Desktop.
How to prevent Browser angular2

Two way we can prevent angular2 browser cache

  1. you can add a querystring to load your components Example:- @Component({ selector: 'app-test', templateUrl: './test.component.html?p=' + Math.random(), styleUrls: ['./test.component.css?p=' + Math.random()'], });

2.You can add in index.html this code Example:-

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment