javascript - How to display Polymer dialog -
i'm trying started google's polymer paper elements 1.0 displaying simple message dialog:
<html> <head> <script src="scripts/polymer/webcomponentsjs/webcomponents.min.js"></script> </head> <body> <paper-dialog opened="true">dialog test</paper-dialog> </body> </html>
the words "dialog test" appear on page, there's no dialog. know i'm missing?
you missing reference paper-dialog
element definition.
<html> <head> <title>example</title> <script src="path/to/webcomponentsjs/webcomponents-lite.js"></script> <link rel="import" href="path/to/paper-dialog/paper-dialog.html" /> </head> <body> <paper-dialog opened="true">dialog test</paper-dialog> </body> </html>
including proper import (<link rel="import" href="path/to/paper-dialog/paper-dialog.html" />
) allow element recognized browser , provide functionality expect including behavior , style.
for interactive tutorial on using web components can check out tutorial on component.kitchen.
Comments
Post a Comment