Advertisement
Guest User

Untitled

a guest
Aug 1st, 2015
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. <form is="iron-form" id="form" >
  2. <paper-input name="userEmail" label="Email" required></paper-input>
  3. <paper-input name="password" type="password" label="Password" required></paper-input>
  4. <br>
  5. <paper-button raised
  6. on-click="login">Submit</paper-button>
  7. </form>
  8.  
  9. <script>
  10. (function() {
  11. Polymer({
  12. is: 'module-login',
  13. login: function() {
  14. // this is used to trigger Polymer's form validation
  15. Polymer.dom(event).localTarget.parentElement.submit();
  16.  
  17. // this is my ajax request
  18. this.$.auth.login(this.$.userEmail.value, this.$.password.value);
  19. }
  20. });
  21. })();
  22. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement