Hacker News new | ask | show | jobs
by hanspragt 3477 days ago
I have recently decided to switch from Polymer to Material2 for the following reasons:

- Polymer is only available through bower, which means I have to teach 2 package management systems to my developers.

- The documentation is not great (for instance, events are documented in camelCase, but must be listened for in Angular 2 using dashes-between-words).

- There are serious issues [0] which not gone resolved for a long time.

- The behavior of important components is not intuitive. For instance, the menu component acts more like a list which has a selected item (which also cannot be reselected)

[0]: https://github.com/webcomponents/webcomponentsjs/issues/541

3 comments

I think you meant to say that you switched to Angular 2 with Angular Material 2 which still considers itself in alpha status which I would not currently use in production.

I agree that the documentation can be improved in that respect, however once you have learned the convention it applies for all components. In angular 1 documentation you had the same issues of `ngRepeat` and similar directives being expressed as `ng-repeat` in the HTML attributes. The only explanation is in the directive documentation [0] which can be pretty exhausting to take in.

[0]: https://docs.angularjs.org/guide/directive#normalization

No, we used Polymer in an Angular 2 app. <- Sorry, I misunderstood what you were saying. Yeah, the full name is Material Design for Angular 2.

Even though Material 2 is in alpha, the components we need just work better than in Polymer; They have fewer quirks, fewer bugs, and fit better into the Angular 2 ecosystem.

Ah, I understand now. I've done some work integrating Angular 2 and Polymer and there are pitfalls.

I've come across this repo in the past for integrating the two but I personally haven't used it yet.

https://github.com/vaadin/angular2-polymer

The integration into Angular 2 was actually fairly seamless once I added vulcanize into the build process.
Polymer 2.x will be distributed with npm + yarn. They had technical reasons to stick with bower for time being. They worked with yarn and it is the solution to the problem :-) There was a talk on the subject on polymer summit.
you serious issue IS merged https://github.com/webcomponents/webcomponentsjs/pull/644 ;-)

Also its NOT polymer issue - it is polyfill issue. It affects things like x-tag,bosonic and others. ANyways it looks like latest release is the fixed version.

I understand that webcomponentsjs is a polyfill, but it is a required dependency for Polymer, and until it uses the version with the fix, the issue will be a problem. Anyway, that was just one example of many.