App with Ionic + Polymer


npm install -g cordova ionic
ionic start myApp blank
cd myApp
bower install --save Polymer/polymer#^0.5
bower update
mkdir -p www/elements/my-element
subl www/elements/my-element/my-element.html

<link rel="import" href="../../bower_components/polymer/polymer.html">

<polymer-element name="my-element" attributes=""> <template>

<span>Hello from <b>my-element</b>.

</template>
<script>
(function () {
Polymer({
// define element prototype here
});
})();
</script>
</polymer-element>

subl www/index.html

...
<head>
...
<link rel="import" href="lib/polymer/polymer.html">
<script src="lib/webcomponentsjs/webcomponents.js"></script>
<link rel="import" href="elements/my-element/my-element.html">
...
<body>
...
<my-element></my-element>
...
</body>
</html>

ionic serve

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s