Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Created a basic modifier that just does a console.log for now, and I get an "Error: Compile Error test-me is not a modifier: Helpers may not be used in the element form." #849

Open
abhatia1994 opened this issue Sep 22, 2023 · 1 comment

Comments

@abhatia1994
Copy link

I am trying to use ember-modifiers for the first time and I created this simple modifier that is just logging.

// modifier test-me.ts
import {modifier} from 'ember-modifier'

export default modifier((element, [], {didItWork}: {didItWork: boolean}) => {
  debugger
  console.log({element, didItWork})
})

When I add it to a template

<div {{test-me didItWork='true'}} />

I get the following error:
Error: Compile Error test-me is not a modifier: Helpers may not be used in the element form.
What am I missing?

@SergeAstapov
Copy link
Collaborator

@abhatia1994 could you please create a minimal reproduction? e.g. github repo with ember new output + create a simpler modifier

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants