I have a set of custom polymer elements that I would like to use in an angular 2 application.
There seems to be a problem with the content tag of the polymer element. The content of the element is displayed in the wrong place inside the polymer element if the element is in the angular 2 component.
Example:
The template for my "my-button" polymer element looks like this:
<template> <button> <content></content> </button> </template>
Use external angular
When I use this element outside of my angular 2 component, I get the result that I expected:
Using:
<my-button>Foo</my-button>
Result:
<my-button> <button> Foo </button> <my-button>
Use as part of angular 2 component
When used in an angular 2 component, content is always displayed at the end of the element template. Just as the content tag does not exist.
Using:
<my-button>Foo</my-button>
Result:
<my-button> <button> </button> "Foo" <my-button>
Question
The problem may be that polymer and angular 2 use a content tag to redirect. So maybe everything gets a little messy when you use both together.
I would like to use all my polymeric elements inside angular 2. Therefore any ideas on how to fix this would be greatly appreciated.
javascript html angular polymer web-component
Simon
source share