Skip to content

Conversation

vicb
Copy link
Contributor

@vicb vicb commented Dec 3, 2015

fixes #5563

<ng-content> is a regular element.

However the template parser will generate an error when it has content.

@vicb
Copy link
Contributor Author

vicb commented Dec 3, 2015

@vicb vicb added the action: merge The PR is ready for merge by the caretaker label Dec 3, 2015
@@ -228,6 +228,11 @@ class TemplateParseVisitor implements HtmlAstVisitor {
hasInlineTemplates ? null : component.findNgContentIndex(elementCssSelector);
var parsedElement;
if (preparsedElement.type === PreparsedElementType.NG_CONTENT) {
if (isPresent(element.children) && element.children.length > 0) {
this._reportError(
`<ng-content> elements can not have content. <ng-content> must be immediately followed by </ng-content>`,
Copy link
Contributor

Choose a reason for hiding this comment

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

  • "elements" -> "element"
  • "can not" -> "cannot"

@IgorMinar IgorMinar added action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews and removed action: merge The PR is ready for merge by the caretaker labels Dec 3, 2015
@IgorMinar IgorMinar assigned vicb and unassigned tbosch Dec 3, 2015
@vicb vicb added action: merge The PR is ready for merge by the caretaker and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels Dec 3, 2015
@mary-poppins
Copy link

Merging PR #5586 on behalf of @jelbourn to branch presubmit-jelbourn-pr-5586.

@pkozlowski-opensource
Copy link
Member

👍

@vicb vicb deleted the 1203-ngContent branch June 23, 2016 17:44
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Decide whether to allow custom self-closing elements.
7 participants