Installation
Prerequisites
- Angular 17 or higher
- Node.js 18 or higher
- npm, yarn, or pnpm
Install via npm
bash
npm install ngxsmk-gatekeeperInstall via yarn
bash
yarn add ngxsmk-gatekeeperInstall via pnpm
bash
pnpm add ngxsmk-gatekeeperPeer Dependencies
The library requires the following peer dependencies (usually already installed in Angular projects):
@angular/common^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0@angular/core^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0@angular/router^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0rxjs^7.2.0 || ^8.0.0
These are typically already installed in Angular projects. If not, install them:
bash
npm install @angular/common @angular/core @angular/router rxjsVerify Installation
After installation, you should be able to import from the library:
typescript
import { provideGatekeeper, gatekeeperGuard } from 'ngxsmk-gatekeeper';If you see TypeScript errors, make sure:
- The library is installed:
npm list ngxsmk-gatekeeper - Your
tsconfig.jsonincludes the library types - Your IDE has reloaded the TypeScript server
Next Steps
- Quick Start - Get started with your first protected route
- Configuration - Learn about gatekeeper configuration options