AbilityModule is not AOT compatible
See original GitHub issueHello,
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.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
Angular provider not provided in AOT - Stack Overflow
Yes, this is because anything a module declares/uses should be statically analyzable for AOT to work. See this for further information.
Read more >Angular: Writing AoT-friendly applications | by David - Medium
Function calls are not supported. Consider replacing the function or lambda with a reference to an exported function. It is caused in bttf....
Read more >harmony(鸿蒙)Ability - seaxiang
The Ability module manages the ability lifecycle and context, such as creating and destroying an ability, and dumping client information.
Read more >ng build fails if AOT is enabled (Angular 11) - DayPilot Forums
This likely means that the library (daypilot-pro-angular) which declares DayPilotModule has not been processed correctly by ngcc, or is not compatible with ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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
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