Bugfix: Two-way binding `[(ngModel)]` parsed incorrectly — `[` check...
Documentation for Sessions
🐛 Bugfix: Two-way binding [(ngModel)] parsed incorrectly — [ check...
Date: 2026-03-24
Time: 18:57:01 UTC
Session: gspace1-267.3
Agent: architecture
Confidence: 99%
Status: ✅ Documented
📋 Decision Context
Question:
Two-way binding
[(ngModel)]parsed incorrectly —[check runs before[(check
Task: Not specified
🎯 Decision Made
Chosen:
Reorder parseAttributeOrBinding() to check
[(before[and(— most specific pattern first.
Options Considered:
- No alternatives documented
💭 Reasoning
The [( two-way binding syntax starts with [, so the [ (property binding) check was matching first, treating (ngModel) as the property name instead of ngModel. Fix: move two-way binding check to the top of the method. This is a classic parsing precedence issue — longer/more-specific patterns must be checked before shorter/general ones.
📁 Files Involved
libs/libs-structural/platform-preview/src/lib/compiler/template-parser.ts
🔗 Related
- Decision ID:
dev_1774378621681_pedwzi1 - Session: 267
- Workspace: gspace1
Auto-generated by MCP Smart Consolidation