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

AbilityModule is not AOT compatible #126

Closed
dgouissem opened this issue Oct 31, 2018 · 8 comments
Closed

AbilityModule is not AOT compatible #126

dgouissem opened this issue Oct 31, 2018 · 8 comments
Labels

Comments

@dgouissem
Copy link

Hello,

Trying to use the CASL Angular port, i find that it's not AOT compatible when bundling it in AOT mode.

below the result after running ng serve --aot --port 2800 --locale fr --live-reload false command:

ERROR in Error: Unexpected value 'AbilityModule in ~/node_modules/@casl/angular/index.d.ts' imported by the module 'AppModule in ~/src/app/app.module.ts'. Please add a @NgModule annotation.

@dgouissem dgouissem reopened this Oct 31, 2018
@stalniy
Copy link
Owner

stalniy commented Nov 1, 2018

Hello,

Thanks for the issue! I'll check it this weekend

@dgouissem
Copy link
Author

Thank you,
Please do you expect a new release in the next days to fix the issue?

@stalniy
Copy link
Owner

stalniy commented Nov 5, 2018

I’m currently out of time) finalizing projects on upwork.

But yes, I’ll take a look at this today. And there a quick solution than I’ll publish right after the fix

@stalniy
Copy link
Owner

stalniy commented Nov 5, 2018

Could you please send me your version of Angular?

@dgouissem
Copy link
Author

Actually, we are working on Angular 5 version and we plan to upgrade to Angular 7.
Is there any blog post or online example for a concret use of CASL with Angular?

@stalniy
Copy link
Owner

stalniy commented Nov 5, 2018

This is my another leftover :) planned in issue #5

I have already started an article but need some free time to finish it. I expect it to be published till the end of November.

You can read Readme of the project for examples of usage https://github.com/stalniy/casl/blob/master/packages/casl-angular/README.md

@stalniy stalniy added the bug label Nov 11, 2018
@stalniy
Copy link
Owner

stalniy commented Nov 11, 2018

the good news: I fixed the issue. Need some time to adapt tests

stalniy added a commit that referenced this issue Nov 11, 2018
In order to build metadata.json & d.ts files by using `ngc`

Fixes to #126
@stalniy
Copy link
Owner

stalniy commented Nov 11, 2018

fixed in @casl/[email protected]
Tested in Angular 7.0 based app. Could you please test under Angular 5.0 ?

stalniy added a commit that referenced this issue Nov 11, 2018
@stalniy stalniy closed this as completed Nov 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants