什么" html?v =<%= VERSION%>"意思?

时间:2015-07-17 03:58:29

标签: javascript html typescript angular

我很难找到答案。 基本上,?v=<%= VERSION %>在以下行上做了什么?

'./components/home/home.html?v=<%= VERSION %>

如果有帮助,可以看到源文件here

或者在这里:

import {Component, View} from 'angular2/angular2';
import {RouterLink} from 'angular2/router';

@Component({
  selector: 'component-1'
})
@View({
  templateUrl: './components/home/home.html?v=<%= VERSION %>',
  directives: [RouterLink]
})
export class Home {}

2 个答案:

答案 0 :(得分:3)

  

?v =&lt;%= VERSION%&gt;

缓存清除的常见技巧

关于该主题的快速谷歌搜索结果:http://webassets.readthedocs.org/en/latest/expiring.html

答案 1 :(得分:2)

我的猜测是,它确实与ASP相似,因此是Response.Write方法的缩写。

<%= VERSION %>

等于

<%
Response.Write(VERSION)
%>

这一行使用这个“写”来控制模板版本。

相关问题