-
Notifications
You must be signed in to change notification settings - Fork 25.6k
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
css :first-child selector will not work when using *ng-for #4805
Comments
You're right, I ran into this a while ago. This happens with Edit <div></div>
<script></script>
<span *ng-if="..."></span>
// css..
div + span {} // won't work |
I know I can use |
According to the HTML5 spec, And for you (and for me :D) I check the definition of
So we can have But you are right, it is not very developer-friendly to have this kind of element. I do not like frameworks that insert tags in my HTML. What is the content of this tag ? |
There is no content, it marks place where views can be inserted. |
@Gillespie59 as @vicb said, there is no content, it's just an anchor for angular 2 to know where to insert views. In my case it's the place where |
@tbosch we should switch back to |
Just for clarification, we currently have the ability to set additional attributes on the script template anchor. Is there a situation where we need to be able to retain this functionality? If not, converting to a comment seems like the right answer. |
Would this be able to make it into Beta00? |
@tbosch can you take a look and determine if this should/can be in beta? |
yes |
… `<template>` elements Closes angular#4805
… `<template>` elements Closes angular#4805
… template>` elements Originally authored by @tbosch, this reverts the revert commit e274ff8. Closes angular#4805
Reopening since the commit was reverted, though hopefully PR #5416 will land soon. |
… template>` elements Originally authored by @tbosch, this reverts the revert commit e274ff8. Closes angular#4805
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
It seems like when using
*ng-for="item of items"
to render a list of items, if I want to use the:first-child
selector it will not work as expected. It looks like right before the first item, there is a<script></script>
tag inserted, so the rendering ends up as:Probably that is intentional, but it should be taken into consideration that this would break the expected behaviour of
:first-child
and a fix for it might be a good idea.The text was updated successfully, but these errors were encountered: