-
因为不是很习惯把View直接写在html里面,找了一下之前的提问,看了下api,期间试着弄了一下,直接报错了。所以希望问一问。
另,我希望直接用html放模板片段,因为直接放在js里面要各种“+”拼接。。。这个可以实现吗?
que01 updated
9 years ago
-
配置参数:
"tmodjs-config": {
"source":"./tpl",
"output": "./build",
"charset": "utf-8",
"syntax": "simple",
"helpers": null,
"escape": true,
"compress": true,
"type": "defa…
-
"tmodjs-config": {
"source": "./static/tpl",
"output": "./build",
"charset": "utf-8",
"combo": true,
"helpers": null,
"syntax": "native",
"minify": true,
"async": fal…
-
上次发的怎么不见了……使用简明语法时,有好方法可以将模板写到纯js文件中吗,比如我有个dialog.js文件,该文件中有对应的js模板,以及对应的js逻辑,模板放到html中的时候,如
<script type="text/html" id="temp"> </script>
var html = template("temp",{});
如果放到js文件中,就没…
-
本人使用grunt-tmod将模板打包成seajs模块,打包时无报错,但是在调用时,IE8-10就出现问题了,具体看图:
这是在页面调用
![image](https://cloud.githubusercontent.com/assets/6982058/6913529/222cab84-d7b4-11e4-9665-ba478bf1c2b0.png)
在谷歌浏览器和火狐浏览器下无报错:
!…
-
您好!我在项目中使用tmodjs编译模板,但是发现编译后的template.js文件中helper方法总是被解析成数据字段($data.xxx),我使用的是原生语法,helper尝试过在模板和在页面里定义,都是一样的问题。是我使用的方式不对吗?
模板代码
helper注册代码
template.helper('test', function(content){
r…
-
hi,我在使用tmodjs编译模板,出现以下错误
```
{ message: 'Unexpected token: punc ())',
```
调试发现代码
https://github.com/aui/artTemplate/blob/master/src/compile.js#L231
返回一个Function,当在tmodjs 的AOTemplate.js文件中https://g…
-
tmodjs是否对原生的art-template语法支持不够?
我使用原生语法生成seajs模块的时候是无法显示数据的,如果是使用simple就不会这样的问题。
请指教。谢谢
-
![image](https://cloud.githubusercontent.com/assets/1010130/5467940/abbf837a-8602-11e4-8ca7-51660d9e5fb2.png)
我明明安装的是1.0.1-rc10 怎么打印出来的是1.0.1-rc9?
-
具体的我描述不是很好描述,上图吧。
我使用的是art-template的原生语法来写模板的。
这是编译前的模板文件 header.html:
这是编译后的模板文件:template.js
define(function(require) {
return require("./template")("header", function($data)…