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.

referenceshost-elements.md

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

Component Host Elements

The host element is the DOM element that matches a component's selector. The component's template renders inside this element.

Binding to the Host Element

Use the host property in the @Component decorator to bind properties, attributes, styles, and events to the host element. This is the preferred approach over legacy decorators.

@Component({
  selector: 'custom-slider',
  host: {
    'role': 'slider', // Static attribute
    '[attr.aria-valuenow]': 'value', // Attribute binding
    '[class.active]': 'isActive()', // Class binding
    '[style.color]': 'color()', // Style binding
    '[tabIndex]': 'disabled ? -1 : 0', // Property binding
    '(keydown)': 'onKeyDown($event)', // Event binding
  },
})
export class CustomSlider {
  protected readonly value = 0;
  protected readonly disabled = false;
  protected readonly isActive = signal(false);
  protected readonly color = signal('blue');

  onKeyDown(event: KeyboardEvent) {
    /* ... */
  }
}

Legacy Decorators

@HostBinding and @HostListener are supported for backwards compatibility but should be avoided in new code.

export class CustomSlider {
  @HostBinding('tabIndex')
  get tabIndex() {
    return this.disabled ? -1 : 0;
  }

  @HostListener('keydown', ['$event'])
  onKeyDown(event: KeyboardEvent) {
    /* ... */
  }
}

Binding Collisions

If both the component (host binding) and the consumer (template binding) bind to the same property:

  1. Static vs Static: The instance (consumer) binding wins.
  2. Static vs Dynamic: The dynamic binding wins.
  3. Dynamic vs Dynamic: The component's host binding wins.

Injecting Host Attributes

Use HostAttributeToken with the inject function to read static attributes from the host element at construction time.

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

@Component({
  selector: 'app-btn',
  template: `<ng-content />`,
})
export class AppButton {
  // Throws error if 'type' is missing unless injected with { optional: true }
  type = inject(new HostAttributeToken('type'));
}

Usage:

<app-btn type="primary">Click Me</app-btn>

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