How to clear template cache?

后端 未结 9 1421
無奈伤痛
無奈伤痛 2020-11-27 18:04

In Angular 2, how do you clear the template cache? There are tons of answers for Angular 1, but none for 2.

The issue I am having is that when I change the contents

9条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-27 18:31

    A better solution is to bundle all of the required files and produce a single .js file, which can be invalidated very easily using a simple query string at the end of the path (?v=1.x). For more info take a look at this official document: Introduction to Webpack: https://angular.io/docs/ts/latest/guide/webpack.html

提交回复
热议问题