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

there is a defect about checklist-before-change #127

Open
e-cloud opened this issue Mar 1, 2016 · 2 comments
Open

there is a defect about checklist-before-change #127

e-cloud opened this issue Mar 1, 2016 · 2 comments

Comments

@e-cloud
Copy link

e-cloud commented Mar 1, 2016

Now, checklist-before-change's behavior is evaluate an expression which perform some judge based on data outside the directive scope.

But, there is a situation. before changing the model, i need to know what's the change going to be, so that i can compare the future and the current to see if let the future happen.

as the event system, no context is horrible.

Now that feature is unavailable.

@beradrian
Copy link
Collaborator

The first argument passed to checklist-before-change is the scope.
What I can do is to also pass the context as this and also add oldValue and newValue as arguments. What do you think about it.

@e-cloud
Copy link
Author

e-cloud commented Mar 1, 2016

here and here is the code.

Actually the scope is used for the parser to evaluate the expression unexceptionally. That's not the argument passed to the function call binded to the directive.

For the design now, i think it's hard to achieve my goal. Sorry, for now, i can just state the issue but not solve it.

May be some general refactoring needed?

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

2 participants