Closed yjbanov closed 8 years ago
In polymer you have to use the polymer Dom APIs for the sort of thing to work. For instance Polymer.Dom(tabs).append(tab)
. This almost certainly causes issues with angular still, I don't know if the polymer JS guys have any ideas...
Just to confirm, this is with the new polymer not the old polymer right?
It's whatever is in g3 right now, but I just checked on polymerjs 1.0 (using their demo app) and it's reproducible.
@jakemac53 How would a react application use the tabs polymer components?
Does Polymer.Dom(tabs)
work with plain html elements as well?
Are you testing with Polymer JS in g3 or Polymer Dart? Polymer Dart is still on the old version, which should work (but will be migrated in soon). Polymer JS has both versions currently.
Here is a related but old Polymer JS issue https://github.com/Polymer/polymer/issues/1405 which points to https://github.com/PolymerLabs/polymer-experiments/blob/master/patch-dom.html as a possible solution.
also @tbosch yes Polymer.dom(tabs)
works with any element, polymer or otherwise.
Cool, thanks for the link
This does not work:
tab
is not projected into the correct location; instead, it remains a direct child of thepaper-tabs
element.This, however, works:
This breaks integration with Angular 2, as Angular 2 inserts elements using the first method, not the second method.