my-greeting.html 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <!--
  2. @license
  3. Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
  4. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  5. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  6. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  7. Code distributed by Google as part of the polymer project is also
  8. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  9. -->
  10. <link rel="import" href="../../bower_components/polymer/polymer.html">
  11. <dom-module id="my-greeting">
  12. <template>
  13. <style include="shared-styles"></style>
  14. <style>
  15. :host {
  16. display: block;
  17. }
  18. </style>
  19. <h2 class="page-title">{{greeting}}</h2>
  20. <span class="paper-font-body2">Update text to change the greeting.</span>
  21. <!-- Listens for "input" event and sets greeting to <input>.value -->
  22. <input class="paper-font-body2" value="{{greeting::input}}">
  23. </template>
  24. <script>
  25. (function() {
  26. 'use strict';
  27. Polymer({
  28. is: 'my-greeting',
  29. properties: {
  30. greeting: {
  31. type: String,
  32. value: 'Welcome!',
  33. notify: true
  34. }
  35. }
  36. });
  37. })();
  38. </script>
  39. </dom-module>