I have a loop like this in revets.js:
<ul>
<li rv-each-article="main_content.latest_articles">
<p rv-on-click="controller.onArticleClick" rv-text="article.title"
data-url="article.url"></p>
</li>
</ul>
Unfortunately article.url
is not being parsed by revets.js so the when logging the value to the console it just prints article.url
while I expect it to get the actual value from the data object and print that out.
How do I fix this?
Just prefix data-url
with rv-
like:
<ul>
<li rv-each-article="main_content.latest_articles">
<p rv-on-click="controller.onArticleClick" rv-text="article.title"
rv-data-url="article.url"></p>
</li>
</ul>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.