angular icon indicating copy to clipboard operation
angular copied to clipboard

<content></content> no longer working with Alpha 32

Open woppa684 opened this issue 11 years ago • 5 comments

consider this example:

import {Component, View, bootstrap} from "angular2/angular2";

@Component({
    selector: "app"
})
@View({
    template: `<div><content></content</div>`,
})
class App {
}

bootstrap(App);

with the html:

<app>My content</app>

Then I would expect "My content" to appear on the page but in fact only the actual content tags are there... This used to work up until Alpha 31 but I can't find anything related in the changelog...

woppa684 avatar Jul 26 '15 18:07 woppa684

Looking at the zippy component example, it's ng-content. https://github.com/angular/angular/blob/master/modules/examples/src/zippy_component/zippy.html#L6

msterba avatar Jul 26 '15 20:07 msterba

See https://github.com/angular/angular/issues/2529. Shadow DOM emulation no longer supports <content> and uses <ng-content> instead I believe because it differs from native shadow DOM.

jessegood avatar Jul 26 '15 21:07 jessegood

Aha, but I would have expected at least something in the changelog then...

woppa684 avatar Jul 26 '15 22:07 woppa684

Changelog has been updated...

tbosch avatar Jul 31 '15 23:07 tbosch

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.