ngxtension
Why ngxtension? ✨
Feature Rich
50+ utilities for modern Angular development
Modern Angular
Built for Angular’s latest features including signals, standalone components, and the new control flow
Performance
Optimized utilities that leverage Angular’s change detection and signals system
Developer Experience
Intuitive APIs that reduce boilerplate and improve code readability
Tree-shakable
Only import what you need, keeping your bundle size minimal
Type-safe
Full TypeScript support with excellent type inference
Focused
Each utility solves a specific problem without unnecessary complexity
Well Documented
Comprehensive documentation with examples and interactive demos
Extensible
Easy to extend and customize for your specific use cases
What does ngxtension offer? 🚀
Signal Utilities
Router Utilities
Injector Utilities
RxJS Operators
Forms
apply sync/async conditional form validation
controlValueAccessorcreate custom form controlscontrolErrorhandle form control errorsformEventsenhanced form event handlingPipes
Effects & Lifecycle
standalone version of NgRx ComponentStore Effect
effectOnceIfrun effect once when condition is metrxEffectutility to create a side effect with rxjsDirectives
efficient iteration with trackby id or prop
Components
collection of Gestures to bind mouse and touch events
Miscellaneous
lazy create singleton instance of a given class
call/applycall and apply functions safelyintlinternationalization utilitiesmergeHttpContextmerge HTTP context providersQuick Start 🚀
Install ngxtension
npm install ngxtension# orpnpm add ngxtension# oryarn add ngxtension
Import and use
Import only what you need. ngxtension is built with tree-shaking in mind.
import { linkedQueryParam, paramToNumber } from 'ngxtension/linked-query-param';import { derivedFrom } from 'ngxtension/derived-from';
@Component({ template: ` <input [(ngModel)]="searchQuery" />
@for (result of results(); track result.id) { <div>{{ result.title }}</div> }
<pagination [(page)]="pageNumber" /> `,})export class MyComponent { readonly searchQuery = linkedQueryParam('search'); readonly pageNumber = linkedQueryParam('page', { parse: paramToNumber({ defaultValue: 1 }), });
readonly results = derivedFrom(this.searchQuery, (query) => this.searchService.search(query), );}