<dom-module id="dashboard-login">
<template>
<style>
:host {
display: block;
}
</style>
<h2>Hello [[prop1]], authenticated=[[authenticated]]!</h2>
<div>
<div><label>Username: </label><input value="{{username::input}}"></input></div>
<div><label>Password: </label><input type="password" value="{{password::input}}"></input></div>
<div>
<button onclick="{{logIn}}" raised>Log in</button>
</div>
</div>
</template>
<script>
/**
* `dashboard-login`
* Login to Dashboard
*
* @customElement
* @polymer
* @demo demo/index.html
*/
class DashboardLogin extends Polymer.Element {
constructor() {
super();
}
static get is() {
return 'dashboard-login';
}
static get properties() {
return {
prop1: {
type: String,
value: 'dashboard-login'
},
username: {
type: String,
value: 'username'
},
password: {
type: String,
value: 'password'
},
authenticated: {
type: Boolean,
value: false
}
};
}
logIn() {
console.log("username="+this.username+", password="+this.password);
}
}
window.customElements.define(DashboardLogin.is, DashboardLogin);
</script>