-
Notifications
You must be signed in to change notification settings - Fork 20
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
Actors do not work inside ng-view / ng-include #7
Comments
Hey Christopher! Thanks for the thorough details. I hope you are still enjoying good mileage out of lift-ng despite this issue. Do you have time to set up a minimal sample project demonstrating the issue? That will be a tremendous help. The Lift guidelines for posting example code describes a good approach. I'll have a look when I get a chance in the next couple of days. |
Hi Joe, I have put a brief project together which shows the issue. Please let me know if I can help with anything else related to this. |
The following is very interesting. Though they are structurally identical, notice how different the generated code for the outer and inner Comet snippets are. It appears that no Comet binding at all is generated for the inner scope. |
any progress on this? using model bindings in views seems to be the most useful feature of lift-ng for my purposes, I would really like to see that. As far as I can tell, I have to bind all possible models at top scope or else I can't use ngRoute. |
Sorry @tek, but there is no progress to report. I haven't dug into this in a while, but I think it will require Lift 3.0. Starting then we support adding comet actors after page load. Unless there is something else creative we can do, we will need that feature. |
Discussion on Lift forum:
https://groups.google.com/forum/#!topic/liftweb/fFgs_-VAx4E
Project demonstrating this issue:
https://github.com/csvan/actor-view-test
Consider the following basic AngularActor:
To respond to it, we add the following logic to a controller:
and finally connect them;
The above works fine, on the condition that the controller is placed in the index.html of the webapp.
If we instead try to place the controller in a view or partial to be included by ng-view or ng-include (respectively) and navigate to the URL causing Angular to load that view/partial, it stops working on the client side. The server still emits pings, but the client no longer
logsreceives them.Analysing the network traffic, it is apparent that the client does at least register the incoming messages.An analysis of the DOM suggests that no Comet bindings at all are generated for the dynamically loaded inner scope: http://hastebin.com/ucodetanaw.xml
The text was updated successfully, but these errors were encountered: