For example I have an array: var arr = ['a', 'b'] and want to get only first element in template
Use {{arr.[0]}}
. And this is now at least 30 characters.
https://github.com/meteor/meteor/blob/devel/packages/spacebars/README.md#identifiers-and-paths
来源:https://stackoverflow.com/questions/28630316/meteor-template-blaze-how-to-return-only-first-element-of-array