Access to nested element

52 views
Skip to first unread message

2tadej....@gmail.com

unread,
Dec 24, 2014, 10:21:45 AM12/24/14
to polym...@googlegroups.com
I want to make a simple login form, with a paper-fab element, and I want to show paper-fab only when user type in username and password.
My code:
<paper-input label="Uporabniško ime" id="paper_input"></paper-input><br />
<paper-input-decorator id="paper_input1" label="Geslo">
    <input id="password" is="core-input" name="j_password" type="password" value="{{j_password}}"/>
</paper-input-decorator>
<div id="div" layout horizontal></div>
<paper-fab id="check" icon="check" showing?="{{$.paper_input.value.length && $.password.value.length !== undefined}}"></paper-fab>

So, how can I access to password input value? 

Thank you in advance!

Regards,
Tadej Golobič

Eric Bidelman

unread,
Dec 24, 2014, 1:39:54 PM12/24/14
to 2tadej....@gmail.com, polymer-dev
Does $.password.value not work?

Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/bf9bf532-2496-4833-8958-560f0a7ad950%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tadej Golobič

unread,
Dec 24, 2014, 6:49:50 PM12/24/14
to Eric Bidelman, polymer-dev
No. This is the ful code
<polymer-element name="nolajn-prijava">
<template>
<paper-input required label="Uporabniško ime" error="Ta polje je obvezno" id="paper_input" floatingLabel></paper-input><br />
      <paper-input-decorator  id="paper_input1" label="Geslo" floatingLabel>
         <input required error="To polje je obvezno" id="password" is="core-input" name="j_password" type="password" value="{{j_password}}"/>
      </paper-input-decorator>
      <div id="div" layout horizontal>
        </div>
      <paper-fab id="check" icon="check" showing?="{{$.paper_input.value.length && $.password.value.length !== undefined}}" on-tap="{{submitLogin}}"></paper-fab>
  </template>
  <script>

    Polymer('nolajn-prijava', 
    {
    });

  </script>
</polymer-element>

paper-fab is visible when user types in username. But I want for paper-fab to be visible when user insert both username and password. Any clue? Am I missing something?

V Wed Dec 24 2014 at 19:39:52 je oseba Eric Bidelman <ebi...@gmail.com> napisala:
Reply all
Reply to author
Forward
0 new messages