Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

refactor(scope): watch "readOnly" arg renamed to "canChangeModel" #817

Closed
wants to merge 1 commit into from

Conversation

vicb
Copy link
Contributor

@vicb vicb commented Mar 31, 2014

closes #739

This changes is a BC break:

  • the "readOnly" parameter has been renamed to "canChangeModel",
  • the semantic is inversed

Before:

// Default to digest (readOnly = false by default)
scope.watch(exp, fn);
// Explicit flush
scope.watch(exp, fn, readOnly: true);

After:

// Default to digest (canChangeModel = true by default)
scope.watch(exp, fn);
// Explicit flush
scope.watch(exp, fn, canChangeModel: false);

closes dart-archive#739

This changes is a BC break:
- the "readOnly" parameter has been renamed to "canChangeModel",
- the semantic is inversed

Before:

    // Default to digest (readOnly = false by default)
    scope.watch(exp, fn);
    // Explicit flush
    scope.watch(exp, fn, readOnly: true);

After:

    // Default to digest (canChangeModel = true by default)
    scope.watch(exp, fn);
    // Explicit flush
    scope.watch(exp, fn, canChangeModel: false);
@vicb vicb added cla: yes and removed cla: no labels Mar 31, 2014
@vicb vicb closed this in 1e67cbb Mar 31, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging this pull request may close these issues.

Renaming the Scope.watch readOnly argument
1 participant