---
author: 'Francisco Rangel'
description:
  'Apply explicit TypeScript access modifiers to Angular component, directive,
  and pipe members. Use when editing or reviewing Angular class APIs in a
  repository that adopts this convention.'
extras:
  'A lightweight AST check could prevent repeated manual review; include only if
  the convention is team-wide.'
focus:
  'Make Angular class visibility explicit while respecting template and public
  APIs.'
id: 'angular-access-modifiers'
improve:
  - '“Every member must be explicit” should be validated against the
    repository’s TypeScript and Angular version/conventions.'
  - 'Do not assume tests require `public`; distinguish real external access from
    test workarounds.'
  - 'Add a verification step using the project typecheck and template compiler.'
name: 'angular-access-modifiers'
path: '../submitted-skills/Francisco%20Rangel/skills/angular-access-modifier/SKILL.md'
status: 'Sharpen scope'
title: 'Angular access modifiers'
wins:
  - 'The template/private/public decision table is memorable.'
  - 'Examples teach the preferred result.'
---

# angular-access-modifiers

## Workflow

1. Inspect the component’s template and callers before changing visibility.
2. Use `protected` for template-facing members when the project supports it,
   `private` for implementation details, and `public` for intentional external
   APIs and lifecycle hooks.
3. Keep existing framework-required visibility when a compiler or decorator
   requires it.
4. Run the project typecheck and relevant template tests.

## Rules

- Do not change visibility only to satisfy a test; fix the test boundary or
  document the API.
- Prefer the repository’s established Angular convention if it differs.

## Output

List changed members, their consumers, and verification results.
