Index of every page on this site: llms.txt
All skills
abiramcodes avatar

/angular-developer

@5863679
by Abiramabiramcodes/ng-point9 stars
Run it yourself

Generates Angular code and provides architectural guidance. Trigger when creating projects, components, services, or HTTP communication, or for best practices on reactivity (signals, linkedSignal, resource, httpResource), queries and content projection, forms, dependency injection, routing, server and hybrid rendering (SSR, prerendering, hydration), accessibility (ARIA), animations, styling (component styles, Tailwind CSS), testing, naming conventions, or CLI tooling.

  • 45 files
  • 180.7 KB
  • MIT
  • Updated 2 days ago
  • GitHub
Use this Skill: https://skilld.dev/gh/abiramcodes/ng-point/angular-developer

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesinjection-context.md

≈483 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Injection Context

The inject() function can only be used when code is executing within an injection context.

Where is an Injection Context Available?

An injection context is automatically available in:

  1. Field initializers of classes instantiated by DI (@Service, @Injectable, @Component, @Directive, @Pipe).
  2. Constructors of classes instantiated by DI.
  3. Factory functions specified in useFactory or InjectionToken configurations.
  4. Functional APIs executed by Angular (e.g., functional route guards, resolvers, interceptors).
@Component({...})
export class Example {
  // ✅ Valid: Field initializer
  private router = inject(Router);

  constructor() {
    // ✅ Valid: Constructor
    const http = inject(HttpClient);
  }

  onClick() {
    // ❌ Invalid: Not an injection context
    // const auth = inject(AuthService);
  }
}

runInInjectionContext

If you need to run a function within an injection context (often needed for dynamic component creation or testing), use runInInjectionContext. This requires access to an existing injector (like EnvironmentInjector or Injector).

import {inject, EnvironmentInjector, runInInjectionContext, Service} from '@angular/core';

@Service()
export class MyService {
  private injector = inject(EnvironmentInjector);

  doSomethingDynamic() {
    runInInjectionContext(this.injector, () => {
      // ✅ Now valid to use inject() here
      const router = inject(Router);
    });
  }
}

assertInInjectionContext

Use assertInInjectionContext in utility functions to guarantee they are called from a valid context. It throws a clear error if not.

import {assertInInjectionContext, inject, ElementRef} from '@angular/core';

export function injectNativeElement<T extends Element>(): T {
  assertInInjectionContext(injectNativeElement);
  return inject(ElementRef).nativeElement;
}

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at 5863679. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 10 hours ago.

Activeupdated 2 days ago
Other metadata
metadata
{
  "author": "Copyright 2026 Google LLC",
  "version": "1.0",
  "internal": true
}

README badge

README badge for abiramcodes/ng-point/angular-developer