Casl: AbilityModule is not AOT compatible

Created on 31 Oct 2018  路  8Comments  路  Source: stalniy/casl

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.

bug

All 8 comments

Hello,

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

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

I鈥檓 currently out of time) finalizing projects on upwork.

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

Could you please send me your version of Angular?

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?

This is my another leftover :) planned in issue https://github.com/stalniy/casl/issues/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

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

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

Was this page helpful?
0 / 5 - 0 ratings