angular
$
npx mdskill add partme-ai/full-stack-skills/angularGuides developers through Angular framework tasks including components, routing, and forms using TypeScript best practices.
- Helps build single-page applications and implement Angular features like services and directives.
- Integrates with Angular CLI, RxJS observables, and TypeScript for project setup and code generation.
- Decides recommendations by identifying request areas and applying official Angular style guides.
- Presents results through generated TypeScript code examples and workflow verification steps.
SKILL.md
.github/skills/angularView on GitHub ↗
---
name: angular
description: "Provides comprehensive guidance for Angular framework including components, modules, services, dependency injection, routing, forms, and TypeScript integration. Use when the user asks about Angular, needs to create Angular applications, implement Angular components, or work with Angular features."
license: Complete terms in LICENSE.txt
---
## When to use this skill
Use this skill whenever the user wants to:
- Build single-page applications (SPA) with Angular
- Create Angular components, services, directives, and pipes
- Implement routing, lazy-loading, and navigation guards
- Work with reactive forms or template-driven forms
- Use dependency injection and Angular modules
- Integrate RxJS observables and the async pipe
- Set up Angular CLI projects and generate scaffolding
- Optimize performance with OnPush change detection
## How to use this skill
### Workflow
1. **Identify the request area** from the user's question (component creation, routing, forms, services, etc.)
2. **Apply Angular best practices** following the official style guide
3. **Generate TypeScript code** using Angular conventions and decorators
4. **Verify** the solution compiles and follows the dependency injection pattern
### 1. Project Setup
```bash
# Create a new Angular project
ng new my-app --routing --style=scss
# Generate components and services
ng generate component features/user-list
ng generate service core/services/user
```
### 2. Component Example
```typescript
import { Component, OnInit, ChangeDetectionStrategy } from '@angular/core';
import { Observable } from 'rxjs';
import { UserService } from '../../core/services/user.service';
import { User } from '../../core/models/user.model';
@Component({
selector: 'app-user-list',
templateUrl: './user-list.component.html',
changeDetection: ChangeDetectionStrategy.OnPush
})
export class UserListComponent implements OnInit {
users$!: Observable<User[]>;
constructor(private userService: UserService) {}
ngOnInit(): void {
this.users$ = this.userService.getUsers();
}
}
```
### 3. Service with HttpClient
```typescript
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
@Injectable({ providedIn: 'root' })
export class UserService {
private readonly apiUrl = '/api/users';
constructor(private http: HttpClient) {}
getUsers(): Observable<User[]> {
return this.http.get<User[]>(this.apiUrl);
}
createUser(user: User): Observable<User> {
return this.http.post<User>(this.apiUrl, user);
}
}
```
### 4. Routing with Lazy Loading
```typescript
const routes: Routes = [
{ path: '', redirectTo: 'dashboard', pathMatch: 'full' },
{ path: 'dashboard', component: DashboardComponent },
{
path: 'users',
loadChildren: () =>
import('./features/users/users.module').then(m => m.UsersModule)
}
];
```
## Best Practices
- Use `OnPush` change detection and pure pipes for performance
- Organize code into Core, Shared, and Feature modules
- Prefer constructor injection; register services with `providedIn: 'root'` for singletons
- Unsubscribe from observables to prevent memory leaks (use `takeUntil` or the `async` pipe)
- Use reactive forms for complex validation scenarios
- Lazy-load feature modules to reduce initial bundle size
## Resources
- Official documentation: https://angular.io/docs
- Angular CLI: https://angular.io/cli
- RxJS: https://rxjs.dev/
## Keywords
angular, Angular CLI, components, services, RxJS, dependency injection, routing, reactive forms, TypeScript, SPA, OnPush, lazy loading, modules, directives, pipes
More from partme-ai/full-stack-skills
- adobe-xd"Guides creation of UI/UX designs, interactive prototypes, reusable components, and design specs in Adobe XD. Use when the user asks about Adobe XD artboards, prototype links, repeat grids, component states, design tokens export, or developer handoff."
- ansible"Provides comprehensive guidance for Ansible automation including playbooks, roles, inventory, and module usage. Use when the user asks about Ansible, needs to automate IT tasks, create Ansible playbooks, or manage infrastructure with Ansible."
- ant-design-mini"Builds mini-program UIs with Ant Design Mini components for Alipay and WeChat mini-programs. Covers Button, Form, List, Modal, Tabs, NavBar, and 60+ components with theme customization and CSS variable theming. Use when the user needs to create mini-program interfaces with Ant Design Mini, configure themes, or implement mini-program-specific UI patterns."
- ant-design-mobile"Builds React mobile UIs with Ant Design Mobile (antd-mobile) components including Button, Form, List, Modal, Picker, Tabs, PullToRefresh, InfiniteScroll, and 50+ mobile-optimized components. Use when the user needs to create mobile-first React interfaces, implement mobile navigation, forms, or data display with Ant Design Mobile."
- ant-design-react"Builds enterprise React UIs with Ant Design (antd) including 60+ components (Button, Form, Table, Select, Modal, Message), design tokens, TypeScript support, and ConfigProvider theming. Use when the user needs to create React applications with Ant Design, build forms with validation, display data tables, or customize the Ant Design theme."
- ant-design-vueProvides comprehensive guidance for Ant Design Vue (AntDV) component library for Vue 3. Covers installation, usage, API reference, templates, and all component categories. Use when building enterprise-class UI with Vue 3 and Ant Design.
- api-doc-generator"Generate API documentation by scanning Controller classes, extracting endpoint URLs, HTTP methods, parameters, and response structures, then producing standardized docs from templates. Use when the user explicitly mentions generating API documentation, creating API docs, scanning interfaces, or documenting REST APIs. Do not trigger for generic documentation requests without explicit API mention."
- appium"Provides comprehensive guidance for Appium mobile testing including mobile app automation, element location, gestures, and cross-platform testing. Use when the user asks about Appium, needs to test mobile applications, automate mobile apps, or write Appium test scripts."
- ascii-ansi-colorizer"Add an ANSI color layer to existing ASCII/plain-text output (gradient/rainbow/highlights) with alignment-safe rules and a required no-color fallback. Use when the user wants to colorize terminal output, add rainbow effects to CLI text, or style ASCII art with ANSI colors."
- ascii-cli-logo-banner"Entry point for ASCII CLI banners that routes to the Python built-in font skill or figlet.js/FIGfont skill. Use when the user wants a startup banner, ASCII logo, terminal welcome screen, or CLI branding for a service."