angular-resource
Installation
SKILL.md
Angular Resource
Version: Angular 19+ (2025) Tags: Resource, Async, Signals
References: Resource API
Best Practices
- Use resource for async data
import { resource } from '@angular/core/rxjs-interop';
@Component({})
export class MyComponent {
private http = inject(HttpClient);
users = resource({
loader: () => this.http.get<User[]>('/api/users').toPromise()
});
}
- Use with request
id = signal<string>('');
user = resource({
request: () => ({ id: this.id() }),
loader: ({ request }) => this.http.getUser(request.id).toPromise()
});
Related skills
More from oguzhan18/angular-ecosystem-skills
angular-tailwind
ALWAYS use when working with Angular and Tailwind CSS, Tailwind configuration, utility-first CSS, or styling Angular applications with Tailwind.
139angular-animations
>-
137rxjs
ALWAYS use when working with RxJS Observables, operators, and reactive patterns in Angular applications.
135angular-material
ALWAYS use when working with Angular Material components, CDK, or Material Design in Angular applications.
131angular-security
ALWAYS use when working with Angular Security, XSS prevention, CSRF protection, Content Security Policy, or sanitization in Angular applications.
130angular-bootstrap
ALWAYS use when working with Angular Bootstrap, ng-bootstrap, Bootstrap components in Angular, or Bootstrap 5 integration.
129