-
Notifications
You must be signed in to change notification settings - Fork 248
Use the paper_element pub package to install deps #1283
Comments
Two points: Using the polymerjs components makes it clear this works across languages, which is pretty cool. We don't actually support native dart web components yet, so the fact that polymer dart works is because they are just a wrapper around polymerjs. We should do more with the examples, but I don't think this is a valid issue. |
Not sure to fully understand your reply. This issue is only about using pub rather than bower. |
To add to what @vicb said, using Pub rather than Bower is kinda important because as soon as you want/need to leverage the API that each polymer element provide, you have no other choices I believe. For example: If you use Bower, you cant really access togglePanel() from Dart as far as I know but maybe I am wrong about that one. |
@tlvenn not sure if you got me right here. I mean using pub instead of bower to install the js file. Yes it will install the dart wrappers but the goal is not to use them. The best is probably to look at the PR I have submitted to understand what I really mean. Note that the additional pkgs are added as a dev dependency because they are only used in the examples. If you need those packages for your application, you need to add them to your application dependencies. Note that one benefit of this PR is to make angular compatible with those 2 packages. Without the PR the pubspec constraints make it impossible to add the pkgs to your app. |
Ha got it, but still for me it's a push in the right direction :) It definitely feels weird in a dart app to suddenly need bower, and when i first saw the demo I kinda felt like it was a hack/workaround of some sort, not something that was meant to stay because It kinda give you the wrong impression that if you use pub to pull polymer somehow angular dart will not work with polymer dart and that'y why you reverted using the js version of polymer instead. |
There are plans to enable pub to fetch bower dependencies, but I don't know when this can be expected. I think Bob Nystrom is working on that. (querySelector("#menu-drawer") as CoreDrawerPanel).togglePanel(); If you don't use the Dart wrappers you have to use dart2js to call methods on the elements. |
@jbdeboer there is a paper_element package on pub (sources are on GH).
What about using this package rather than installing the deps of the paper demo via bower ?
IIUC the goal of the demo is rather to demonstrate the usage of Web Components with angular. Then we should probably not use the dart wrappers from this package but only use to package as a simpler way to install deps (and maybe rename the demo from
paper
towebcomponents
?)The text was updated successfully, but these errors were encountered: