UNPKG

@koalarx/ui

Version:

Koala UI is a modern and accessible component library designed to speed up interface development in Angular projects. With simple integration and clear documentation, you can easily build robust and visually appealing applications.

1 lines 998 B
{"version":3,"file":"koalarx-ui-core-guards.mjs","sources":["../../projects/koala-ui/core/guards/auth.guard.ts","../../projects/koala-ui/core/guards/koalarx-ui-core-guards.ts"],"sourcesContent":["import { inject, Injectable } from '@angular/core';\nimport { CanActivate, GuardResult, MaybeAsync } from '@angular/router';\nimport { Authorization } from '@koalarx/ui/shared/services';\n\n@Injectable()\nexport class AuthGuard implements CanActivate {\n private readonly authService = inject(Authorization);\n\n canActivate(): MaybeAsync<GuardResult> {\n return this.authService.isAuthenticated();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAKa,SAAS,CAAA;AACH,IAAA,WAAW,GAAG,MAAM,CAAC,aAAa,CAAC;IAEpD,WAAW,GAAA;AACT,QAAA,OAAO,IAAI,CAAC,WAAW,CAAC,eAAe,EAAE;;uGAJhC,SAAS,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;2GAAT,SAAS,EAAA,CAAA;;2FAAT,SAAS,EAAA,UAAA,EAAA,CAAA;kBADrB;;;ACJD;;AAEG;;;;"}