Skip to content
This repository has been archived by the owner on Feb 22, 2018. It is now read-only.

Use the paper_element pub package to install deps #1283

Closed
vicb opened this issue Jul 31, 2014 · 6 comments
Closed

Use the paper_element pub package to install deps #1283

vicb opened this issue Jul 31, 2014 · 6 comments

Comments

@vicb
Copy link
Contributor

vicb commented Jul 31, 2014

@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 to webcomponents ?)

@vicb vicb changed the title Using the paper Using the paper_element pub package to install deps Jul 31, 2014
@vicb vicb changed the title Using the paper_element pub package to install deps Use the paper_element pub package to install deps Jul 31, 2014
vicb added a commit to vicb/angular.dart that referenced this issue Sep 19, 2014
@jbdeboer
Copy link
Contributor

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.

@vicb
Copy link
Contributor Author

vicb commented Sep 20, 2014

Not sure to fully understand your reply. This issue is only about using pub rather than bower.

@tlvenn
Copy link

tlvenn commented Sep 21, 2014

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: (querySelector("#menu-drawer") as CoreDrawerPanel).togglePanel();

If you use Bower, you cant really access togglePanel() from Dart as far as I know but maybe I am wrong about that one.

@vicb
Copy link
Contributor Author

vicb commented Sep 21, 2014

@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.

@tlvenn
Copy link

tlvenn commented Sep 21, 2014

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.

@zoechi
Copy link
Contributor

zoechi commented Sep 22, 2014

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.
You can find examples in the Dart core- and paper-elements.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging a pull request may close this issue.

4 participants