-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
twice loop problem! #1
Comments
PaulGuo
added a commit
that referenced
this issue
May 9, 2012
PaulGuo
added a commit
that referenced
this issue
May 9, 2012
PaulGuo
added a commit
that referenced
this issue
May 9, 2012
PaulGuo
added a commit
that referenced
this issue
May 9, 2012
:),haha,so quickly!!3Q |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
var data={
list:[
{name:'guokai',show:true},
{name:'benben',show:false},
{name:'dier',show:true}
],
blah:[
{num:1},
{num:2,inner:[
{'time':'15:00'},
{'time':'16:00'}
]},
{num:3,inner:[
{'time':'15:00'},
{'time':'16:00'},
{'time':'16:00'}
]},
{num:4,inner:[
{'time':'15:00'},
{'time':'16:00'},
{'time':'16:00'}
]}
]
};
var tpl=[
'
',- ${it.name} (index: ${k})
',- ',
',
''{@each list as it,k}',
'
'{@/each}',
'{# first level attribute must specify the "data." prefix}',
'{@each blah as it}',
'
'num: ${it.num}
',
'{@if it.num==3}',
'{@each it.inner as it2}',
'${it2.time}
',
'{@/each}',
'{@/if}',
'
'{@/each}',
'
].join('');
console.log(juicer(tpl,data));
output only three items limited by the max number of the second loop,but the first loop have full 4 items?why?
The text was updated successfully, but these errors were encountered: