Uncaught (in promise) Error: AUR0713: Unknown binding command: delegate

I just create new project via npx with Aurelia 2 version is 2.0.0.beta.1 and add simple code:

Click

Uncaught (in promise) Error: AUR0713: Unknown binding command: delegate
at createError (index.dev.mjs?bb4a:46:1)
at CompilationContext._createCommand (index.dev.mjs?bb4a:6795:1)
at TemplateCompiler._compileElement (index.dev.mjs?bb4a:6161:1)
at TemplateCompiler._compileNode (index.dev.mjs?bb4a:6023:1)
at TemplateCompiler._compileNode (index.dev.mjs?bb4a:6030:1)
at TemplateCompiler.compile (index.dev.mjs?bb4a:5771:1)
at Rendering.compile (index.dev.mjs?bb4a:2772:1)
at Controller._hydrate (index.dev.mjs?bb4a:3055:1)
at Controller._hydrateCustomElement (index.dev.mjs?bb4a:3041:1)
at Controller.$el (index.dev.mjs?bb4a:2985:1)

delegate has been removed. You can use trigger instead. So in your code when you are binding events it would look something like this:

<button click.trigger="onClick()>Click me</button>
1 Like

You’re right. Thank you :star_struck:

1 Like

The messages around the removed binding command have been enhanced in DEV dist. you can see in this commit chore(doc): better dev message for missing delegate and call binding … · aurelia/aurelia@cb0f646 · GitHub

3 Likes