AUR0652
Error Message
AUR0652: Aurelia is unable to observe property <property>. Register observation mapping with .useConfig().
Where <property> is the name of the DOM element property that Aurelia tried to observe.
Description
This error occurs when Aurelia's binding system attempts to create an observer for a specific property on an HTML element node, but it cannot find a suitable observation strategy for that combination of element type and property name. Aurelia comes with built-in observers for common properties (like value on <input>, checked on checkboxes, scrollTop on elements, etc.), but this error indicates the requested property is not covered by the default strategies.
Cause
Binding to Non-Standard/Custom Properties: You are trying to bind to a property on a standard HTML element that Aurelia doesn't observe by default (e.g., binding directly to a less common DOM property or a custom property added to an element).
Typo: The property name in the binding expression might be misspelled (e.g.,
valuee.bindinstead ofvalue.bind).Missing Configuration for Custom Elements/Attributes: If you are working with custom elements or attributes that need specific observation logic (perhaps interacting with third-party libraries or complex components), the necessary observation strategy might not have been registered with Aurelia's
NodeObserverLocator.
Solution
Verify Property Name: Double-check the spelling of the property name in your binding expression in the HTML template. Ensure it matches the actual DOM property you intend to observe.
Use Standard Bindable Properties: For custom elements, prefer defining
@bindableproperties in your view model and bind to those, rather than trying to directly observe arbitrary DOM properties of the custom element's host.Register Custom Observation Strategy: If you genuinely need to observe a specific, non-standard DOM property, you may need to implement and register a custom
IObserverLocatororINodeObserverLocatorstrategy. This is an advanced scenario, typically required when integrating with libraries that manipulate the DOM in non-standard ways or for observing properties not natively supported. You would register this during your application's startup configuration phase using.withConfig().
Example
Debugging Tips
Carefully inspect the property name
<property>mentioned in the error message.Check the HTML element type associated with the binding.
If it's a standard HTML element, verify if the property is commonly observed by Aurelia (like
value,checked,scrollTop,scrollLeft,css, style properties). If not, direct observation might not be supported.If it's a custom element, ensure you are binding to a property explicitly marked with
@bindablein the element's view model.Consider if the property is part of a third-party library integration; you might need specific configuration or adapters provided by that library or custom observation logic.
Last updated
Was this helpful?