Skip to content Skip to sidebar Skip to footer

Using Paper Datatable In Angular2

I have been struggling for quiet a while about using paper-data-table (paper data table by David Mulder) in my angular 2 application. The problem im facing is described in the data

Solution 1:

<template> elements are processed by Angular internally and never actually land in the DOM.

Some suggestions

  • ensure you have shadow DOM enabled for Polymer and full polyfills loaded for browsers without native shadow DOM support. See also https://www.polymer-project.org/1.0/docs/devguide/settings.html

  • you could wrap the element that provides the <template> and the data-table element inside another Polymer element, so that Angular doesn't process the <template> element because it's part of a Polymer element instead of a Angular view.

  • you could try to add the template element imperatively to the DOM to circument Angulars template processing

See also this issue I reported recently https://github.com/angular/angular/issues/7974

Solution 2:

I think I managed to get to some solution. I altered small parts of the source code, this might "hurt" some features (I think only the ones related to the column array) but I work with it in my project and it works great. I also wrote a small angular 2 component wrapper to ease things up.

You can check it out here:

paper-datatable-fixes-for-angular-2

Post a Comment for "Using Paper Datatable In Angular2"