debugCheckBindings function

  1. @experimental
void debugCheckBindings(
  1. [bool enabled = true]
)

Opt-in/out to more precise and exhaustive checking of AngularDart bindings.

The current (live) version of checkBinding (in debug mode) accidentally was implemented where it only checks primitive values (strings, numbers, booleans, null) and not other types. While in practice most bindings eventually propagate to strings, this makes errors much more difficult to debug.

Context (expression and source location) is also reported when available.

WARNING: This API is not considered part of the stable API.

Implementation

@experimental
void debugCheckBindings([bool enabled = true]) {
  _debugCheckAllExpressionsAndReportExpressionContext = enabled;
  if (isDevMode && enabled) {
    _warnAboutExperimentalFeature();
  }
}