Loading...
Loading...
Enterprise Angular development expert specializing in Angular 16+ features, Signals, Standalone Components, and RxJS/NgRx at scale.
npx skill4agent add 404kidwiz/claude-supercode-skills angular-architectWhat is the complexity level?
│
├─ **Local State (Component)**
│ ├─ Simple? → **Signals (`signal`, `computed`)**
│ └─ Complex streams? → **RxJS (`BehaviorSubject`)**
│
├─ **Global Shared State**
│ ├─ Lightweight? → **NgRx Signal Store** (Modern, functional)
│ ├─ Enterprise/Complex? → **NgRx Store (Redux)** (Strict actions/reducers)
│ └─ Entity Collections? → **NgRx Entity**
│
└─ **Server State**
└─ Caching/Deduplication? → **TanStack Query (Angular)** or **RxJS + Cache Operator**| Pattern | Use Case | Pros | Cons |
|---|---|---|---|
| Standalone | Default for 15+ | Less boilerplate, tree-shakable | Learning curve for legacy devs |
| Nx Monorepo | Multi-app enterprise | Shared libs, affected builds | Tooling complexity |
| Micro-Frontends | Different teams/stacks | Independent deployment | Runtime complexity, shared deps hell |
| Zoneless | High performance | No Zone.js overhead | Requires explicit Change Detection |
performance-engineertakeUntilDestroyedimport { signalStore, withState, withMethods, patchState } from '@ngrx/signals';
export const UserStore = signalStore(
{ providedIn: 'root' },
withState({ users: [], loading: false, query: '' }),
withMethods((store) => ({
setQuery(query: string) {
patchState(store, { query });
},
async loadUsers() {
patchState(store, { loading: true });
const users = await fetchUsers(store.query());
patchState(store, { users, loading: false });
}
}))
);export class UserListComponent {
readonly store = inject(UserStore);
constructor() {
// Auto-load when query changes (Effect)
effect(() => {
this.store.loadUsers();
});
}
}// main.ts
bootstrapApplication(AppComponent, {
providers: [
provideExperimentalZonelessChangeDetection()
]
});ApplicationRef.tick()signal()AsyncPipetoSignalsetIntervalsignalthis.route.params.subscribe(params => {
this.service.getData(params.id).subscribe(data => {
this.data = data; // Manual assignment
});
});this.data$ = this.route.params.pipe(
switchMap(params => this.service.getData(params.id))
);AsyncPipetoSignal<div *ngIf="user.roles.includes('ADMIN') && user.active && !isLoading">isAdmin = computed(() => this.user().roles.includes('ADMIN'));<div *ngIf="isAdmin()">SharedModuleimports: []NgModulesloadComponentOnPush@deferstrict: trueAsyncPipetoSignal.subscribe()innerHTMLng-dompurify