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

Pre routing event that so one can conditionally stop routing. #169

Open
nmingneau opened this issue Jun 1, 2018 · 2 comments
Open

Pre routing event that so one can conditionally stop routing. #169

nmingneau opened this issue Jun 1, 2018 · 2 comments

Comments

@nmingneau
Copy link

Example from angularjs:

$scope.$on('$locationChangeStart', function(event, next, current) {
    if ($scope.form.$invalid) {
       event.preventDefault();
    }
});
@justinbmeyer
Copy link
Contributor

@chasenlehara it would be good to think about how can-bind could maybe prevent the writing of one object to another.

@chasenlehara chasenlehara removed their assignment Jul 11, 2018
@chasenlehara
Copy link
Member

can-bind has setChild and setParent options, so if you need control over when values are set, you can use those.

[That’s not an answer to this issue.]

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

No branches or pull requests

3 participants