Last active
February 28, 2017 08:56
-
-
Save rafagarcia/ef8e31684a0610425c4a36ea14dabe00 to your computer and use it in GitHub Desktop.
Employee.html con elemento polymaiap-employee
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- | |
| @license | |
| Copyright (c) 2016 The Polymer Project Authors. All rights reserved. | |
| This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt | |
| The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | |
| The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt | |
| Code distributed by Google as part of the polymer project is also | |
| subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt | |
| --> | |
| <link rel="import" href="../bower_components/polymer/polymer.html"> | |
| <link rel="import" href="../bower_components/app-route/app-route.html"> | |
| <link rel="import" href="shared-styles.html"> | |
| <dom-module id="polymaiap-employee"> | |
| <template> | |
| <style include="shared-styles"> | |
| :host { | |
| display: block; | |
| padding: 10px; | |
| } | |
| img { | |
| border-radius: 50%; | |
| } | |
| a { | |
| margin-left: 24px; | |
| } | |
| </style> | |
| <app-route | |
| route="[[route]]" | |
| pattern="/:page/:firstname" | |
| data="{{routeData}}"></app-route> | |
| <div class="card"> | |
| <img src$="[[item.image]]" alt="[[item.firstName]] [[item.lastName]]" /> | |
| <h1>[[item.firstName]] [[item.lastName]]</h1> | |
| <p>[[item.position]]</p> | |
| </div> | |
| <a href="/list">< Return to Employees List</a> | |
| </template> | |
| <script> | |
| Polymer({ | |
| is: 'polymaiap-employee', | |
| properties: { | |
| item: { | |
| type: Object, | |
| observer: '_onItemReceived' | |
| } | |
| }, | |
| _onItemReceived: function() { | |
| console.log('item in employee page', this.item); | |
| } | |
| }); | |
| </script> | |
| </dom-module> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment