oguzhan18/angular-ecosystem-skills

angular-services

ALWAYS use when working with Angular Services, @Injectable, dependency injection, or business logic services.

First seen Apr 2, 2026

Installation

$ npx skills add oguzhan18/angular-ecosystem-skills --skill angular-services

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from oguzhan18/angular-ecosystem-skills · top by installs.

npx skills add oguzhan18/angular-ecosystem-skills

Browse all from oguzhan18/angular-ecosystem-skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 7
License LICENSE
Default branch main
Open issues 0
Status Active

Skill metadata

Parsed from SKILL.md frontmatter.

Version21.0.0
More metadata
version
21.0.0
generated_by
oguzhancart
generated_at
2026-02-19

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,814 B
  • docs SUMMARY.md 133 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 191 installs

SKILL.md

Angular Services

Version: Angular 21 (2025) Tags: Services, @Injectable, DI

References: Services Guide@Injectable API

Best Practices

  • Create service with providedIn
@Injectable({ providedIn: 'root' })
export class DataService {
  getData() {
    return this.http.get('/api/data');
  }
}
  • Use inject() function
@Injectable({ providedIn: 'root' })
export class UserService {
  private http = inject(HttpClient);
  
  getUsers() {
    return this.http.get<User[]>('/api/users');
  }
}
  • Use factory providers
@Injectable({
  providedIn: 'root',
  useFactory: () => new LoggerService(environment.production)
})
export class LoggerService {
  constructor(private isProduction: boolean) {}
}
  • Use providedIn: 'any' for lazy services
@Injectable({ providedIn: 'any' })
export class LazyService {}
  • Use service in component
@Component({})
export class MyComponent {
  private dataService = inject(DataService);
  
  data$ = this.dataService.getData();
}
  • Use multiple services
@Component({})
export class MyComponent {
  private auth = inject(AuthService);
  private http = inject(HttpClient);
  private router = inject(Router);
}
  • Use service for shared state
@Injectable({ providedIn: 'root' })
export class CartService {
  private items = signal<Item[]>([]);
  
  cartItems = this.items.asReadonly();
  
  addItem(item: Item) {
    this.items.update(items => [...items, item]);
  }
}