ui : temp commit to test template

This commit is contained in:
simon louvet
2018-11-20 16:28:00 +01:00
parent 7c0f88153d
commit b7da28c3a8
10 changed files with 66 additions and 40 deletions

View File

@ -55,15 +55,24 @@ document.addEventListener('WebComponentsReady', function(event) {
class HDAppClient extends SIBWidget {
get template() {
return `<img name="${this.name}" src="${this.value.logo}"/>`;
return `<div>${this.value}</div>`;
}
render() {
store.get(this.value).then(value => {
this._value = value;
this.innerHTML = this.template;
});
this.innerHTML = this.template;
}
// get template() {
// return `<img name="${this.name}" src="${this.value.logo}"/>`;
// }
//
// render() {
// store.get(this.value).then(value => {
// this._value = value;
// this.innerHTML = this.template;
// });
// }
}
customElements.define('hdapp-client', HDAppClient);