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

[embedded futures] AngularActor doesn't do plumbing.inject on model change #10

Closed
arkadius opened this issue Dec 30, 2014 · 3 comments
Closed

Comments

@arkadius
Copy link
Contributor

Hi,

First of all I would like to thank you for a good piece of work building excellent bridge between lift and Angular.

I've tried to create sample app using embedded futures and stacked on javascript error while updating state of SimpleNgModelBinder by other actor that binder is listener of. As I investigated the problem is that updated model is sended without plumbing. This happens in TwoWaySessionNamed.fromServer - buildMutator only bind new value to scope without plumbing.

I just have been starting advanture with Lift and Lift-ng so its hard for me to propose how to fix this problem but I requested test modification that reproduce the problem: #9.

BTW. during this test, without my modifications, TypeError was thrown in $watch handler, because handler is invoked on initial state which is undefined. I've tried to add some additional webDriver.manage().logs() check on tests ends but this error log haven't been seened by webdriver :-/

Cheers,
Arek

@joescii
Copy link
Owner

joescii commented Dec 31, 2014

Hey Arek! Thanks for checking out lift-ng. You are 100% correct that futures don't work with binders (yet). I had not yet committed to building that because I wasn't sure if anyone would find it useful. I see now that at least one person would like it. 👍

I'll check out your PR soon to see how you've made this enhancement. Hopefully it just works and all I need to do is release it. :)

Thanks again for trying out the project and contributing ideas and code back to it!

Joe

@arkadius
Copy link
Contributor Author

As I wrote before, I've only requested test modification that reproduce the problem. In fact embedded futures wasn't necessary for me, because I have a future on top of message, but I assume based on documentation that it is the only possibility for futures to work. Eventually I handle a future and in callback send the real result back to the Binder: https://github.com/arkadius/micro-burn/blob/138a46c2bd00e060a7573754b8d9048aca1eb020/src/main/scala/org/github/microburn/comet/ProjectStateBinder.scala

I will follow lift-ng and try contribute enhancements if i will see it :-)

joescii added a commit that referenced this issue Jul 26, 2015
@joescii
Copy link
Owner

joescii commented Aug 10, 2015

Sorry it took me so long to wrap this one up. It turned out to be pretty easy. 👍 Released in 0.7.0

@joescii joescii closed this as completed Aug 10, 2015
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