Skip to content

Instantly share code, notes, and snippets.

@web-devel
Created July 3, 2017 15:35
Show Gist options
  • Save web-devel/3659ef13ccaefc6597e1ae649dcb42cf to your computer and use it in GitHub Desktop.
Save web-devel/3659ef13ccaefc6597e1ae649dcb42cf to your computer and use it in GitHub Desktop.
<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