Better know a framework #23: Validate binding property name

Sometimes, during development, you would like to validate all bindings of a view to see if there’s any typo. There is one way to do that with View engine hooks. Online demo at: https://codesandbox.io/s/aurelia-binding-name-validator-1isjv

Just need to make sure you don’t include it in your production build, via something similar to below:

if (environment.debug) {
  aurelia.globalResources('path-to-validator')
}
4 Likes