{{fn ...}}
hbs
{{fn function ..args}}{{fn}} allows you to pass parameters along to functions in your templates:
js
import { fn } from '@ember/helper';
function showAlert(message) {
alert(`The message is: '${message}'`);
}
<template>
<button type="button" {{on "click" (fn showAlert "Hello!")}}>
Click me!
</button>
</template>TODO
Make this a built-in helper
- Tracking Issue: ?