1

Im trying to play around with the new NgTemplateOutlet. I have found and read about it here:

NgTemplateOutlet example that doesn't work for me

I tried using the same sample in there, but I always get the same error: Template parse errors: components on an embeded template: MyDir

I guess there is something not correct with the example or at least missing (or maybe im wrong but I did try everything I could think of for 3 hours)

What im aiming to achieve ultimatly once I have a working example with NgTemplateOutlet is to write the following in my component html:

<template is="dom-bind"></template>

If I write it as is, angular will just remove the entire template tag from the dom. The reason to why I need this is described in the following questetion which is already on stack over flow: using paper datatable in angular2

Community
  • 1
  • 1
Ziv Glazer
  • 786
  • 2
  • 8
  • 24
  • 3
    How is `NgTemplateOutlet` related to Polymer? Please add more code/html that demonstrates what you actually try to accomplish. – Günter Zöchbauer May 01 '16 at 13:51
  • It doesn't, but the template tag does. The code would like to work is the one in the first sample that I linked to. I copied this cde to my applucaition and it didn't do anything. I would like to know if its incorrect – Ziv Glazer May 07 '16 at 08:39
  • 1
    See http://stackoverflow.com/questions/37676593/how-to-repeat-a-piece-of-html-multiple-times-without-ngfor-and-without-anoher-c/37676946#37676946 for Plunker examples. – Günter Zöchbauer Jun 30 '16 at 06:41
  • Look at this: http://www.bennadel.com/blog/3101-experimenting-with-dynamic-template-rendering-in-angular-2-rc-1.htm – Nickon Aug 24 '16 at 13:05

0 Answers0