-
Notifications
You must be signed in to change notification settings - Fork 19
Require check fails for directive as transclude content #19
Comments
I've created a pull request to fix this problem (#20). Hopefully it will fix the issue. Would appreciate very much if you could have a look at it. |
Thanks @sasyomaru! I believe this is the source of various the issues with controllers others have been having. |
@sasyomaru I played with this a little and it seems that we don't even need the hidden container, we can simply attach the transcluded content directly to the element, and then the link functions will move the content into the correct places. @rainboxx it does indeed work, I just want to find the minimal solution possible (which this may well be). |
@zachsnow I appreciate your investigation! I found out that this PR will not fix all issues that we're having. Our directive using the |
@rainboxx interesting, any chance you can sketch out more precisely what you mean? |
I can try to make a jsfiddle tomorrow, I'm about to leave for bed now (UTC+1). |
@rainboxx thanks very much. |
@sasyomaru I suppose we could add |
The flashing content is also what I concerned most. But adding ng-hide may have conflict if the directive user already add ng-hide (for example, to show the template only under some condition). |
@sasyomaru you make a good point re: |
It seems we should be able to get rid of this:
Because |
I've updated |
I'm using ng-multi-transclude in a website and find an issue on the disconnection of transclude content and the context.
For example,
When running the code, there will be an error "[$compile:ctreq] Controller 'form', required by directive 'belowForm', can't be found!" and the template is not filled correctly.
This is because the controller doesn't append the transclude content into its context until ctrl.transclude is called, but the link of directive happens in $transclude, which makes the content lost the context.
The text was updated successfully, but these errors were encountered: