-
-
Notifications
You must be signed in to change notification settings - Fork 268
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
ValueConverter registration in @casl/aurelia #619
Comments
I thought nobody uses Aurelia) but if you take a look at -> https://github.com/stalniy/casl/blob/master/packages/casl-aurelia/src/value-converter/can.ts#L28 you can see that class is properly marked. class names is just a one way to register resources. There is an explicit way to do this. Anyway, I have not looked into Aurelia for a long time. So maybe you use incompatible version with casl. |
Additionally, I found converters to be less convenient/readable than pure props. At least in casl for Angular I plan to replace pipes with observables |
I do and I love it:) I think I found the issue. The problem was not with the value converter, but the
The problem is that the I have not completely found out how to solve this, but I will try and make a PR if I can fix the bug. |
Probably you register it too late or too early. So something overwrites container I guess. I don’t think there is an issue with casl so I close this. Feel free to reopen when you find the issue in casl |
You are right. This is not an issue with casl. It turns out that this is a webpack/aurelia-webpack-plugin issue.
This ensures that only the When I do |
Describe the bug
The current minified build of
@casl/aurelia
does not retain the original class names which causes the name of the value converter to not be retained. For a value converter to be registered in aurelia its class name must end withValueConverter
which is not the case in the current minified build.To Reproduce
Steps to reproduce the behavior:
Simply add
aurelia.use.plugin(PLATFORM.moduleName("@casl/aurelia"));
and see that theable
value converter is not correctly registered. If this call is replaced with:then the converter is registered correctly with the name
able
.Expected behavior
The expected behavior is that
aurelia.use.plugin(PLATFORM.moduleName("@casl/aurelia"));
should correctly register the value converter. For this to work the minified build should have the following line:instead of the current:
CASL Version
@casl/ability
- v5.4.3@casl/aurelia
- v1.2.0Environment:
The text was updated successfully, but these errors were encountered: