Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

docs(guide/unit-testing): add info on testing element transclude directives #8197

Conversation

petebacondarwin
Copy link
Contributor

Closes #4505

@mary-poppins
Copy link

Thanks for the PR! Please check the items below to help us merge this faster. See the contributing docs for more information.

  • Uses the issue template (#8197)

If you need to make changes to your pull request, you can update the commit with git commit --amend.
Then, update the pull request with git push -f.

Thanks again for your help!

@petebacondarwin
Copy link
Contributor Author

@caitp - does this read right to you?


If the directive is using 'element' transclusion then the compiler will actually remove the
directive's entire element from the DOM and replace it with a comment node. The template is
then inserted "after" this comment node.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The template is then inserted "after" this comment node.

This is really just a convention we have in core, this isn't really enforced by anything. Explaining that might be a bit too complicated, though

@caitp
Copy link
Contributor

caitp commented Jul 14, 2014

It's probably good enough, I guess



Before compilation:
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should include html after ```; same with below.

petebacondarwin added a commit that referenced this pull request Jul 15, 2014
ckknight pushed a commit to ckknight/angular.js that referenced this pull request Jul 16, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Surprising behavior (and regression) when $compiling ngInclude directives
4 participants