Reputation: 299
I was wondering if aurelia should throw error on failed binding ? I use durandal a lot, and a useful feature was "binder.throwOnErrors = true;" If a binding failed it would throw an error in the console.
But in aurelia, say i got a "version" var in my VM. If i bind
${non-existing-var}
or even
${non-existing-object.non-existing-property}
it won't say anything.
So far aurelia is good, but sometimes it's a real pain to dig the template and to figure why the binding ain't working.
I've tried to dig in the aurelia-binding class, but could not find any clue. Thank you :)
I also use the default configuration (i see [Debug] logs in the console)
aurelia.use
.standardConfiguration()
.developmentLogging();
Upvotes: 2
Views: 163
Reputation: 26406
Aurelia does not throw when an attempt is made to bind to an null/undefined property (or chain of properties). This is intentional- Aurelia supports binding to things that aren't yet defined but will become defined later.
Other developers have requested an option log these occurrences be added. This request is tracked here.
Upvotes: 2