Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to model in compose bindings doesn't call the activate method. #15

Closed
Souldrinker opened this issue Feb 11, 2015 · 0 comments
Closed
Assignees
Labels

Comments

@Souldrinker
Copy link

When using string based view-model in a compose binding the activate method of the composed view doesn't get called when the model of the composed binding changes.

The modelChanged method of compose.js looks like this:

    modelChanged(newValue, oldValue){
        if(this.viewModel && typeof this.viewModel.activate === 'function'){
            this.viewModel.activate(newValue);
        }

So if you use string based view models the check for an activate function always fails and thus the activate isn't triggered as expected (and as it does in Durandal).

Some more details about this issue can be found in todays (2015-02-11) Gitter chat between me and @zewa666 or here: https://github.com/Souldrinker/compose-issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants