Ionic + Polymer (Material/Paper) not working on Android

I’m trying to leverage the Google Polymer paper elements within my ionic project, specifically targeting Android (4.4). The elements render fine in Chrome, but when launched in the device or emulated in Genymotion they do not render. I am lost as to how to troubleshoot this and am hoping for some guidance on getting these to work.

Thanks,

Chris

I had the same problem. The platform.js file should be the first script on the page in order to work properly on the emulator.

Thanks for the suggestion, unfortunately did not resolve. Any other ideas?

Please not that using polymer and ionic/angular together is not suggested.

Instead check out angular material.

https://material.angularjs.org/#/

Since this is all written in angular, it will play well with ionic

OK. So I built the angular/material components and added everything to my ionic project. I am getting errors about the materialRipple directive missing when using the checkbox component among others:

Error: [$injector:unpr] Unknown provider: $$qProvider ← $$q ← $throttle ← materialRippleDirective

I do see this is built into material-design.js and I have this included in the project, but it’s barfing. Any thoughts?

Hmm, what order are you including the files?

  • angular-animate.min.js
  • angular-animate-sequence.js
  • angular-animate-stylers.js
  • material-design.js
  • app.js

And where is ionic being loaded in this? Also, are you using ionic.bundle?

Yes, apologies.

  • ionic.bundle.js
  • cordova.js
  • angular-animate.min.js
  • angular-animate-sequence.js
  • angular-animate-stylers.js
  • material-design.js
  • app.js

Of the components that I can successfully render without js errors, it looks like ionic css styles are overriding the component styles:

I’ll just hold off until material angular components are an official part of ionic.