Add a noscript attribute to your element:
<link rel="import" href="./components/polymer/polymer.html">
<polymer-element name="my-element" *noscript*>
<template>
<style>
div { width: 300px;}
my-element { font: bold 16px cursive;}
</style>
<div>
<p>rtrthdfghdfghdfghdgsdfasdfa</p>
</div>
</template>
</polymer-element>
Or give it a script tag that calls the polymer constructor
<link rel="import" href="./components/polymer/polymer.html">
<polymer-element name="my-element">
<template>
<style>
div { width: 300px;}
my-element { font: bold 16px cursive;}
</style>
<div>
<p>rtrthdfghdfghdfghdgsdfasdfa</p>
</div>
</template>
<script>
Polymer('my-element', {
// prototype can go here if you want
});
</script>
</polymer-element>
On Tue, Jul 22, 2014 at 1:38 AM, <[email protected]> wrote:
> Hi,
> I'm trying to learn polymer and fail to use a basic polymer element I
> prepare.
> *index.html*
> <!doctype html>
> <html>
> <head>
> <title>My Test</title>
> <script src="./components/platform/platform.js"></script>
> <link rel="import" href="my-element.html">
> </head>
> <body>
> <div>
> <my-element></my-element>
> </div>
> </body>
> </html>
>
> *my-element.html*
> <link rel="import" href="./components/polymer/polymer.html">
> <polymer-element name="my-element">
> <template>
> <style>
> div { width: 300px;}
> my-element { font: bold 16px cursive;}
> </style>
> <div>
> <p>rtrthdfghdfghdfghdgsdfasdfa</p>
> </div>
> </template>
> </polymer-element>
>
> Now, I see in chrome that all resources are loaded fine (200 OK), yet
> nothing appears on page.
> what's wrong here?
>
> Follow Polymer on Google+: plus.google.com/107187849809354688692
> ---
> You received this message because you are subscribed to the Google Groups
> "Polymer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/polymer-dev/2796d771-c2fc-45b6-8272-cd7131275742%40googlegroups.com
> <https://groups.google.com/d/msgid/polymer-dev/2796d771-c2fc-45b6-8272-cd7131275742%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/polymer-dev/CAJj5OwAE-XnBVw45-etU_-XHYqKD%2BRwm3zVJumfud7A5EwR3Bg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.