1

I have db-module which is element that is in-charge of handling data. Then I created this element in my join-module. But when I try to access db-module method join(email,password) it says that it is not a function

db-module:

   <template>
    <firebase-app 
        auth-domain="campus-3320b.firebaseapp.com"
        database-url="https://campus-3320b.firebaseio.com"
        api-key="AIzaSyBVpKa8SmWPKl595AZ8BmCMVBOkmZ6Lft0"
        storageBucket="campus-3320b.appspot.com">
    </firebase-app>
    <firebase-auth 
        id="auth" 
    >
    </firebase-auth>
</template>

 Polymer({
      is: 'data-module',
      join: function(email,password){
          console.log('join')
        this.$.auth.signInWithEmailAndPassword(email,password);
      },
      login: function(email,password){
          this.$.auth.createUserWithEmailAndPassword(email, password);
      }
});

join-module :

<db-module id="auth"></db-module>



 Polymer({
  is: 'join-module',
  name: String,
  surname: String,
  email: String,
  password1: String,
  join: function(){
      this.$.auth.join(this.email,this.password)
  } 
});
Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Robert Kim
  • 133
  • 1
  • 2
  • 8

0 Answers0