Let\'s say I\'ve got this simple list rendering component:
import {Input, Component } from \'angular2/core\'
@Component({
selector: \'my-list\',
templat
Been looking for an answer to this for a week now and I finally came up with a pretty decent solution. Instead of using ngForTemplate I would suggest using ngTemplateOutlet.
It is already described pretty well here: angular2 feeding data back to `` from `[ngTemplateOutlet]`
The custom template for the list items is placed between the component tags:
Template for: {{item.text}} ({{item.id}})
And the component template:
-
I made an example here: https://plnkr.co/edit/4cf5BlVoqzZdUQASVQaC?p=preview