Open Closed

Cannot read properties of null (reading 'createEmbeddedView') inside *abpPermission directive #2816


User avatar
0
cezary.bojko created
  • ABP Framework version: v5.1.4
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • ERROR TypeError: Cannot read properties of null (reading 'createEmbeddedView') at ViewContainerRef.createEmbeddedView (core.mjs:22794:37) at Object.next (abp-ng.core.mjs:1927:28) at ConsumerObserver.next (Subscriber.js:91:33) at SafeSubscriber._next (Subscriber.js:60:26) at SafeSubscriber.next (Subscriber.js:31:18) at distinctUntilChanged.js:14:28 at OperatorSubscriber._next (OperatorSubscriber.js:13:21) at OperatorSubscriber.next (Subscriber.js:31:18) at map.js:7:24 at OperatorSubscriber._next (OperatorSubscriber.js:13:21)

  • Steps to reproduce the issue:" After update from 4.4 to 5.1.4 and angular 13. Happens almost everywhere.

It looks like this is something related with abpPermission directive

div [abpPermission]="permissions" ...

After deleting this [abpPermission] in one place problem disappeared.


1 Answer(s)
  • User Avatar
    0
    muhammedaltug created

    Hello,

    Attribute usage of AbpPermissionDirective is deprecated in 4.0 version and deleted in 5.0 version. Please use the structural directive instead of the attribute directive.

    You can look at the related issue for more information.

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.3.0-preview. Updated on April 16, 2025, 12:13