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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

DI resolving for value converters works incorrecty within slotted content #1797

Closed
ekzobrain opened this issue Jul 15, 2023 · 1 comment
Closed
Labels
Bug Something isn't working topic: au-slot au-slot related issues

Comments

@ekzobrain
Copy link
Contributor

ekzobrain commented Jul 15, 2023

馃悰 Bug Report

Cause might be this PR: #1735

Example:

class SomeCustomElementWithSlot {}
<template>
  <au-slot></au-slot>
</template>
class SomeCustomElement {
  static dependencies = [SomeCustomElementWithSlot, SomeValueConverter];
}
<some-custom-element-with-slot>
  <input value.bind="value | someValueConverter">
</some-custom-element-with-slot>

馃 Expected Behavior

works

馃槸 Current Behavior

Throws exception:
Error: AUR0009: Attempted to jitRegister something that is not a constructor: 'au:resource:value-converter:someValueConverter'. Did you forget to register this resource?
Seems like the wrong container is invoked, but only for evaluated expressions (value converters, binding behaviors), because custom elements are resolved correctly.

馃拋 Possible Solution

Register value converter in the root container.

馃敠 Context

馃捇 Code Sample

馃實 Your Environment

Software Version(s)
Aurelia 2.0.0-beta.7
Language
Browser
Bundler
Operating System
NPM/Node/Yarn
@bigopon bigopon added Bug Something isn't working topic: au-slot au-slot related issues labels Jul 18, 2023
@bigopon bigopon closed this as completed Jul 18, 2023
@bigopon
Copy link
Member

bigopon commented Jul 18, 2023

Resolved by #1802

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working topic: au-slot au-slot related issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants