Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form is="iron-form" id="form" >
- <paper-input name="userEmail" label="Email" required></paper-input>
- <paper-input name="password" type="password" label="Password" required></paper-input>
- <br>
- <paper-button raised
- on-click="login">Submit</paper-button>
- </form>
- <script>
- (function() {
- Polymer({
- is: 'module-login',
- login: function() {
- // this is used to trigger Polymer's form validation
- Polymer.dom(event).localTarget.parentElement.submit();
- // this is my ajax request
- this.$.auth.login(this.$.userEmail.value, this.$.password.value);
- }
- });
- })();
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement