"Vulcanized" Polymer Paper-elements don't work in Cordova

224 views Asked by At

I'm developing an HTML app with Cordova. I'm using the Crosswalk web views. I've been tried to use Polymer (v0.5) to integrate the paper-elements components. In the same way, I read that isn't possible loading the html components using <link rel="import" href="../bower_components/paper-elements/paper-elements.html">; the solution is use the Vulcanize build tool, for concatenating the components in a single page.

I did all of that, but the app still not recognizing the paper-elements. I wrote a small example of my scenario, and is as follow:

The structure of the www/ directory in my cordova project is:

    www/
      bower_components/
      css/
      html/
        index.html
        vulcanized.html
      img/
      js/
      bower.json
      index.html

The www/index.html are the generated of vulcanize building of the www/html/index.html archive. The last one is like this:

    <!doctype html>
     <html>
      <head>
       <title>Test Project</title>
       <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
       <meta name="mobile-web-app-capable" content="yes">
       <meta name="apple-mobile-web-app-capable" content="yes">

       <link rel="import" href="../bower_components/paper-elements/paper-elements.html">


      </head>
      <body unresolved>

       <div id="login">
        <form>
         <paper-input label="Name" floatingLabel></paper-input>
         <br>
         <paper-input label="Password" floatingLabel></paper-input>
         <br>
         <paper-button toggle>Sign in</paper-button>
        </form>
       </div>

      </body>
     </html> 

That works well in a local server, but it doesn't work at all in the Web View.

Does anybody help me with that? Isn't possible to use paper-elements with Cordova at all?

Thanks in advance!
Pedro.

1

There are 1 answers

0
kashesandr On

Have you included webcomponentsjs/webcomponents.min.js in HEAD?