{"action":"opened","issue":{"url":"https://api.github.com/repos/mikeric/rivets/issues/571","repository_url":"https://api.github.com/repos/mikeric/rivets","labels_url":"https://api.github.com/repos/mikeric/rivets/issues/571/labels{/name}","comments_url":"https://api.github.com/repos/mikeric/rivets/issues/571/comments","events_url":"https://api.github.com/repos/mikeric/rivets/issues/571/events","html_url":"https://github.com/mikeric/rivets/issues/571","id":131733307,"number":571,"title":"Rivets function auto-execution in expressions","user":{"login":"jccazeaux","id":5689583,"avatar_url":"https://avatars.githubusercontent.com/u/5689583?v=3","gravatar_id":"","url":"https://api.github.com/users/jccazeaux","html_url":"https://github.com/jccazeaux","followers_url":"https://api.github.com/users/jccazeaux/followers","following_url":"https://api.github.com/users/jccazeaux/following{/other_user}","gists_url":"https://api.github.com/users/jccazeaux/gists{/gist_id}","starred_url":"https://api.github.com/users/jccazeaux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jccazeaux/subscriptions","organizations_url":"https://api.github.com/users/jccazeaux/orgs","repos_url":"https://api.github.com/users/jccazeaux/repos","events_url":"https://api.github.com/users/jccazeaux/events{/privacy}","received_events_url":"https://api.github.com/users/jccazeaux/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-05T19:32:25Z","updated_at":"2016-02-05T19:32:25Z","closed_at":null,"body":"In this issue, I would like to discuss the auto-execution of functions in Rivets expressions\r\n```html\r\n{ model.myFunction }\r\n```\r\nIf `myFunction` is a function, Rivets will execute it and send the result in the template.\r\n\r\nI think we should turn off this feature. It would allow us to manually call the function **with parameters**. This would be a powerfull feature for a very small cost. The manual execution would be handled by a formatter like\r\n```html\r\n{ model.myFunction | call model.param1 'param2' }\r\n```\r\n\r\nFor backward compatibility reasons we could have a parameter in Rivets configuration\r\n```javascript\r\nrivets.configure({autoExecuteFunctions: true});\r\n```\r\n\r\nI know it's less user friendly than a JS expression. But it's in the rivets template syntax and would totally benefit of the existing databinding mecanism without any additional work.\r\nI like rivets expression syntax, because it's very easy to learn but very powerful."}}