Title: feat(language-service): add Document Symbols support for Angular templates · Issue #66691 · angular/angular · GitHub
Open Graph Title: feat(language-service): add Document Symbols support for Angular templates · Issue #66691 · angular/angular
X Title: feat(language-service): add Document Symbols support for Angular templates · Issue #66691 · angular/angular
Description: Feature Request: Document Symbols support for Angular templates ✅ Status: Implemented in PR #66690 Description The Angular Language Service should provide Document Symbols for Angular templates to enhance IDE features like the Outline pa...
Open Graph Description: Feature Request: Document Symbols support for Angular templates ✅ Status: Implemented in PR #66690 Description The Angular Language Service should provide Document Symbols for Angular templates to ...
X Description: Feature Request: Document Symbols support for Angular templates ✅ Status: Implemented in PR #66690 Description The Angular Language Service should provide Document Symbols for Angular templates to ...
Opengraph URL: https://github.com/angular/angular/issues/66691
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"feat(language-service): add Document Symbols support for Angular templates","articleBody":"# Feature Request: Document Symbols support for Angular templates\n\n## ✅ Status: Implemented in PR #66690\n\n## Description\n\nThe Angular Language Service should provide Document Symbols for Angular templates to enhance IDE features like the Outline panel, breadcrumbs navigation, and \"Go to Symbol\" (Cmd+Shift+O / Ctrl+Shift+O).\n\n## Implementation\n\nPR #66690 implements comprehensive Document Symbols support including:\n\n### Features\n1. **Block syntax**: `@if`, `@for`, `@switch`, `@defer`, `@let` with their expressions\n2. **Structural directives**: `*ngIf`, `*ngFor`, `*ngSwitch` with their expressions\n3. **Context variables**: Loop items, aliases (`let i = $index`), expression aliases (`as alias`)\n4. **Template references**: `#ref` variables\n5. **HTML elements**: With semantically appropriate icons\n6. **Hybrid approach**: Default shows only component classes with templates (configurable)\n\n### SymbolKind Mapping\n\n| Template Element | SymbolKind | Icon |\n|-----------------|------------|------|\n| `@if`, `@switch` | Struct | 🔶 |\n| `@for` | Array | 📦 |\n| `@defer` | Event | ⚡ |\n| HTML elements | Object | 🟡 |\n| Variables | Variable | |\n\n### Configuration\n\n```json\n{\n // Disable Angular document symbols\n \"angular.documentSymbols.enabled\": false,\n \n // Show implicit @for variables ($index, $count, etc.)\n \"angular.documentSymbols.showImplicitForVariables\": true,\n \n // Show all TypeScript symbols (methods, properties)\n \"angular.documentSymbols.showTypescriptSymbols\": false\n}\n```\n\n### Default Output (Hybrid Approach)\n```\nMyComponent (class)\n└── (template)\n ├── @if (condition)\n └── \u003cbutton>\n```\n\n### With `showTypescriptSymbols: true`\n```\nMyComponent (class)\n├── ngOnInit (method)\n├── onClick (method)\n├── someProperty (property)\n└── (template)\n ├── @if (condition)\n └── \u003cbutton>\n```\n\n## Example\n\nTemplate:\n```html\n@for (item of items; track item.id; let i = $index) {\n @if (item.visible; as isVisible) {\n \u003cdiv #container>{{ item.name }}\u003c/div>\n }\n}\n```\n\nOutline:\n```\n@for (item of items) 📦\n├── let item\n├── let i\n├── @if (item.visible; as isVisible) 🔶\n│ ├── let isVisible\n│ └── \u003cdiv> 🟡\n│ └── #container\n```\n\n## Motivation\n\n- **Improved navigation**: Quickly jump to any template element\n- **Better overview**: Understand template structure at a glance \n- **Consistency**: Match experience with TypeScript code navigation\n- **Modern Angular**: Full support for new control flow syntax\n\n## Labels\n\n- `area: language-service`\n- `feature`\n- `vscode-extension`\n","author":{"url":"https://github.com/kbrilla","@type":"Person","name":"kbrilla"},"datePublished":"2026-01-21T19:57:06Z","url":"https://github.com/angular/angular/issues/66691"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:bbf24bb4-25da-2502-453e-4399a7c66795 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8756:38E318:2DFB075:3A3D59C:6B01F04B |
| html-safe-nonce | 4b3db9a96ab06033af9d925bfa83a12d2bbcc08690a9b2f9f866dc5f2fe9c270 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NzU2OjM4RTMxODoyREZCMDc1OjNBM0Q1OUM6NkIwMUYwNEIiLCJ2aXNpdG9yX2lkIjoiODI4MjIwNjEyMjY4MTY5MjIzNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f0eb5a9a36f4a804997d884e99489a358e8319fa9a7ee2b5a995ff617f054526 |
| hovercard-subject-tag | issue:3839799635 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/66691/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7163b1e7c7691726c14853e2adb2969bdb7127f9da363233281b8a7a8484b303/angular/angular/issues/66691 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7163b1e7c7691726c14853e2adb2969bdb7127f9da363233281b8a7a8484b303/angular/angular/issues/66691 |
| og:image:alt | Feature Request: Document Symbols support for Angular templates ✅ Status: Implemented in PR #66690 Description The Angular Language Service should provide Document Symbols for Angular templates to ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | kbrilla |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width