From ed83673c622186dee5889f7bc699addea26db0ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sinan=20=C3=96zt=C3=BCrk?= Date: Wed, 15 Nov 2023 23:31:23 +0300 Subject: [PATCH] add guard migrations --- docs/en/Migration-Guides/Abp-8_0.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/en/Migration-Guides/Abp-8_0.md b/docs/en/Migration-Guides/Abp-8_0.md index b8db916e28..b408cfc921 100644 --- a/docs/en/Migration-Guides/Abp-8_0.md +++ b/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: