Skip to content
Back to skills

Angular Modern

ASecurity

Guidelines for using modern Angular APIs (signals, inject, control flow)

  • 720 stars
  • 0 votes
  • 0 copies
  • 8 views
  • Added May 28, 2026
developmenttypescriptangularapi

Works with

  • api

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned May 28, 2026

npx -y skills add mgechev/skillgrade --skill angular-modern --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Angular Modern?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Angular Modern
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mgechev-angular-modern/badge)](https://www.skillsdirectory.com/skills/mgechev-angular-modern)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: angular-modern-apis
description: Guidelines for using modern Angular APIs (signals, inject, control flow)
---

# Angular Modern APIs

This skill describes the mandatory coding standards for Angular components in our codebase.

## Rules

All Angular components must follow these rules:

1. **Use signal-based inputs** — Use `input()` and `output()` instead of `@Input()` and `@Output()` decorators
2. **Use `inject()` for DI** — Use `inject()` function instead of constructor parameter injection
3. **Use built-in control flow** — Use `@if`, `@for`, `@switch` instead of `*ngIf`, `*ngFor`, `*ngSwitch`

## Examples

### Signal inputs (correct)

```typescript
import { Component, input, output } from '@angular/core';

@Component({ ... })
export class UserProfileComponent {
  name = input.required<string>();
  age = input(0);
  saved = output<void>();
}
```

### inject() for DI (correct)

```typescript
import { Component, inject } from '@angular/core';
import { UserService } from './user.service';

@Component({ ... })
export class UserProfileComponent {
  private userService = inject(UserService);
}
```

### Built-in control flow (correct)

```html
@if (user()) {
  <h1>{{ user().name }}</h1>
} @else {
  <p>No user found</p>
}

@for (item of items(); track item.id) {
  <li>{{ item.name }}</li>
}
```

Files in this skill

  • README.md1.5 KB
  • SKILL.md1.3 KB
  • eval.yaml2.1 KB
  • fixtures/src/app/user-profile.component.ts931 B
  • graders/check-modern-apis.js2.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.