Browse Source

add guard migrations

pull/18157/head
Sinan Öztürk 3 years ago
parent
commit
ed83673c62
  1. 22
      docs/en/Migration-Guides/Abp-8_0.md

22
docs/en/Migration-Guides/Abp-8_0.md

@ -103,6 +103,28 @@ You don't need to make any changes related to that, however it's important to kn
In this version, `AbpAspNetCoreAsyncIntegratedTestBase` class has been set as `Obsolete` and it's recommended to use `AbpWebApplicationFactoryIntegratedTest` instead.
## Angular UI
# Guards
From Angular Documentation;
> Class-based **`Route`** guards are deprecated in favor of functional guards.
- Angular has been using functional guards since version 14. According to this situation we have moved our guards to functional guards.
We have modified our modules to adaptate functional guards.
```diff
- import {AuthGuard, PermissionGuard} from '@abp/ng.core';
+ import {authGuard, permissionGuard} from '@abp/ng.core';
- canActivate: mapToCanActivate([AuthGuard, PermissionGuard])
+ canActivate: [authGuard, permissionGuard]
```
You can still use class based guards but we recommend it to use functional guards like us :)
## Upgraded NuGet Dependencies
You can see the following list of NuGet libraries that have been upgraded with .NET 8.0 upgrade, if you are using one of these packages explicitly, you may consider upgrading them in your solution:

Loading…
Cancel
Save