Get started with Ngememoize by installing the package and setting up your first memoized function.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/akbarsaputrait/ngememoize/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before installing Ngememoize, ensure your project meets these requirements:- Angular 19 or later - Ngememoize requires Angular 19.0.0+
- TypeScript - Modern TypeScript support (comes with Angular)
- Node.js - For package management with npm, yarn, or pnpm
Install the package
Choose your package manager
Install Ngememoize using your preferred package manager:The package will be added to your
package.json dependencies.Peer dependencies
Ngememoize requires the following Angular packages as peer dependencies:Ngememoize uses the
hash-it library internally for optimized key generation. This is installed automatically as a dependency.Import the decorator
Once installed, you can import the@Ngememoize decorator in any component, service, or class:
Optional: Import the service
If you want to access cache statistics or manage caches programmatically, import the service:No additional setup required
Unlike some Angular libraries, Ngememoize doesn’t require:- Module imports (works with standalone components)
- Provider configuration
- App configuration changes
- Build tool modifications
Verify it works
Create a simple test to ensure everything is working:10. The second call should only log 10 because the result was cached.
Next steps
Quick start guide
Learn basic memoization patterns
Advanced options
Explore all available decorator options