rivets v0.9.0 Release Notes
Release Date: 2016-05-21 // almost 8 years ago-
🔄 Changes
- 🛠 Fix binders which received 0 instead of undefined when HTML attributes were empty #567
- 📚 Now functions are not executed by Rivets in expressions. To call the function you need to use the
call
formatter. See documentation here #571 - 👌 Support for nested rv-each with an index for each iteration. Index names can be configured, see documentation here #551
- 👌 Support for pipes in quoted arguments #432
- 👌 Support for constant string in component HTML attributes #478
- 🛠 Fix rebind bug when a templated used nested
rv-if
binders #611
⬆️ Upgrading from 0.8
0️⃣ Since 0.9 Rivets will not execute functions by default. This will allow passing arguments to function with the
call
formatter.- Calling function in 0.8
{ item.myFunction }
- Calling function in 0.9
{ item.myFunction | call}
- Calling function in 0.9 with arguments
{ item.myFunction | call myArgument 'argument as string'}
- You can force function executions to have your application work in
0.9
without using thecall
formatter. This is done with the configurationrivets.configure({ // Since rivets 0.9 functions are not automatically executed in expressions. If you need backward compatibilty, set this parameter to true executeFunctions: true });
- Calling function in 0.8
Using multiple indexes in nested
rv-each
. Since0.9
rivets allows to have a specific index variable for each iteration.<ul> <li rv-each-todo="todos"> <ul> <li rv-each-item="todo.items"> <span>item #{ %item% } in todo #{ %todo%}</span> <!-- Here the index will be the same as %item% --> </li> </ul> </li> <ul>
The
index
is still available for compatibility reasons but you must be aware that it will only represent the last iteration.