Created
July 3, 2017 15:35
-
-
Save web-devel/3659ef13ccaefc6597e1ae649dcb42cf to your computer and use it in GitHub Desktop.
This file contains 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
<link rel="import" href="../bower_components/polymer/polymer.html"> | |
<link rel="import" href="../bower_components/cuba-app/cuba-app-aware-behavior.html"> | |
<dom-module id="cuba-user-info"> | |
<template> | |
<style> | |
:host { | |
display: block; | |
} | |
</style> | |
[[userInfo.login]] | |
</template> | |
<script> | |
Polymer({ | |
is: 'cuba-user-info', | |
behaviors: [CubaAppAwareBehavior], | |
properties: { | |
userInfo: Object, | |
notify: true | |
}, | |
observers: ['_init(app)'], | |
_init: function () { | |
this.app.getUserInfo().then(function (userInfo) { | |
this.userInfo = userInfo; | |
}.bind(this)); | |
} | |
}); | |
</script> | |
</dom-module> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment