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.

referencesoutputs.md

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

Outputs (Custom Events)

Outputs allow a child component to emit custom events that a parent component can listen to. Angular recommends using the new output() function for modern applications.

Function-based outputs

Declare outputs using the output() function. This returns an OutputEmitterRef.

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

@Component({
  selector: 'custom-slider',
  template: `<button (click)="changeValue(50)">Set to 50</button>`,
})
export class CustomSlider {
  // Output without event data
  readonly panelClosed = output<void>();

  // Output with event data (number)
  readonly valueChanged = output<number>();

  changeValue(newValue: number) {
    this.valueChanged.emit(newValue);
  }
}

Usage in Template

Bind to the output event using parentheses (). If the event emits data, access it using the special $event variable.

<custom-slider (panelClosed)="savePanelState()" (valueChanged)="logValue($event)" />

Configuration Options

The output function accepts a config object to specify an alias.

@Component({...})
export class CustomSlider {
  // The event is named 'valueChanged' in the template,
  // but accessed as 'changed' in the component class.
  readonly changed = output<number>({ alias: 'valueChanged' });
}

Programmatic Subscription

When creating components dynamically, you can subscribe to outputs programmatically:

const componentRef = viewContainerRef.createComponent(CustomSlider);

const subscription = componentRef.instance.valueChanged.subscribe((val) => {
  console.log('Value changed:', val);
});

// Clean up manually if needed (Angular cleans up destroyed components automatically)
subscription.unsubscribe();

Decorator-based Outputs (@Output)

The legacy API uses the @Output() decorator with an EventEmitter. It remains supported but is not recommended for new code.

import { Component, Output, EventEmitter } from '@angular/core';

@Component({...})
export class LegacyExample {
  @Output() readonly valueChanged = new EventEmitter<number>();

  // With alias
  @Output('customEventName') readonly changed = new EventEmitter<void>();
}

Best Practices

  • Prefer output(): Use the function-based output() instead of @Output() and EventEmitter.
  • Naming: Use camelCase for output names. Avoid prefixing with on (e.g., use valueChanged instead of onValueChanged).
  • No DOM Bubbling: Angular custom events do not bubble up the DOM tree like native events.
  • Avoid Collisions: Do not choose names that collide with native DOM events (like click or submit).

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