-
-
Notifications
You must be signed in to change notification settings - Fork 276
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
Different instances of Ability in root and lazy loaded module #131
Comments
The only thing which was changed in Angular package is dynamic typings and metadata generation. I tested that on Angular 7 and it worked ok. Could you please share your your version of Angular? |
Also it’d be helpful to see error message |
I'm using angular 6.1.6 and i don't get any error, it just don't work, it is like all rules aren't allowed. |
I generated project using angular cli and manually changed versions to 6.1.6 and it works as expected. Could you please check this repo https://github.com/stalniy/casl-angular-sample and try to reproduce your error? |
@rodrigoreal, have you tested provided repo? |
The problem is that the rules are not being passed to a lazyloaded module. Run the application and go to
But from the lazyloaded module the rules array is being empty
|
I see. The issue with lazy loaded modules fixed in I added a note about this in README for @casl/angular |
Thanks for the issue! |
I'm using with angular and i've just upgraded the version of the package and it stopped working.
@casl/ability: 2.4.2 -> 2.5.1
@casl/angular: 0.3.1 -> 0.4.1
When i downgraded back to the previous version it worked again.
I'm trying to find if there is any breaking change between these versions but I did not find anything related.
Below is a part of my code:
The text was updated successfully, but these errors were encountered: