-
Notifications
You must be signed in to change notification settings - Fork 42
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
ng-include inside sf-virtual-repeat #14
Comments
I think the first case couldn't work because, as the error says, angular won't allow it. The second case is a limitation of the way virtual repeaters work. It should be fixable by adding an explicit CSS height to that inner div. Pop a class on it and set "height: 20px" or whatever. |
I have tried the first case with ng-repeat, it work! |
It is an annoying limitation, to be sure. But it's also fundamental to how virtual scrolling works as a concept. No matter how it's implemented, you need to be able to calculate how high the full set of elements is. You could, in theory, wait until an element was rendered and then read the height of that, but angular doesn't stabilise that way and there's no event you can hook into. The only workaround I've seen is to use a timer to read the height and re-adjust. That's just a hack too far for me. I'll look again at the first case, maybe something changed in angular that made this work (need to scan through this: angular/angular.js#3584) |
Okay, I got it. |
In the first case: "This is not an ideal solution to the problem of multiple transclusions per element" |
Hi Paul, |
I'm afraid not - the code you referenced above is explicitly checking for ngRepeat. Short of getting angular to check for sfVirtualRepeat too, I'm not sure I can do anything about it. Leaving the ticket open to remind myself to have another look though. |
Closing - pretty sure I can't fight other directives over transcludes without really nasty things happening |
Hi stackfull,
I'm trying to combine sf-virtual-repeat with ng-include, but I got error in 2 following cases:
Error: [$compile:multidir] Multiple directives [sfVirtualRepeat, ngInclude] asking for transclusion
Error: Unable to compute height of row
Could you help me out, or any suggestion, thanks..
The text was updated successfully, but these errors were encountered: