无法获得聚合物元素的功能

时间:2016-07-19 14:21:12

标签: firebase polymer polymerfire

我有db-module,它是负责处理数据的元素。然后我在join-module中创建了这个元素。但是当我尝试访问db-module方法join(email,password)时,它表示它不是函数

分贝模块:

   <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)
  } 
});

0 个答案:

没有答案
相关问题