# Code maintenance OP-20641 - Enable Angular compiler strictTemplates option

Project: OpenProject
Status: merged
URL: https://community.openproject.org/work_packages/OP-20641

## OPEN POINTS

_No work packages_

## Subtasks

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Designer |  |
| Developers | Alexander Coles |
| Requires doc change | No |
| Date |  |
| Priority | Medium |
| Target versions | 18.0.0 |
| Sprint |  |
| Backlog bucket |  |
| Module | Frontend components and Primer design system |
| Accessibility | No |
| List |  |

## Estimates and progress

| Attribute | Value |
| --- | --- |
| Work |  |
| Remaining work |  |

## Description

**Context**

The Angular frontend builds with `strictTemplates` disabled, so templates are not type-checked against their components. Wrong input types, missing properties and mismatched event payloads compile and only surface as UI bugs at runtime. Enabling the option uncovered four real defects, split out as <mention class="mention" data-id="OP-20659" data-type="work_package" data-text="#OP-20659">#OP-20659</mention>.

**Work**

  - Make the templates honor their component contracts: type inputs, template contexts and event payloads, and narrow values where they enter a template instead of loosening inputs or using `$any()`.
  - Adapt the shared autocompleter to ng-select 24's signal inputs without patching ng-select further.
  - Enable `strictTemplates` for application and spec sources.
  - Typed selections for the edit fields and multiselect filters follow in <mention class="mention" data-id="OP-20660" data-type="work_package" data-text="#OP-20660">#OP-20660</mention>.

**Hints for QA**

The change is meant to be behavior-neutral. Areas touched most, worth a quick pass:

  - Autocompleters: assignee, project, labels, version and parent fields on a work package; search, select, clear.
  - Work package table filters: add, change and remove values, including "me" and the relation columns in the table configuration; reload and check the URL keeps the filters.
  - Boards, team planner, BIM and the GitHub tab on a work package with a linked pull request: open and interact as usual.
  - Work package cards: open a card with the mouse, Enter and Space; Enter or Space with a modifier key held should do nothing.
