登录应用程序后,我想将配置文件(前端)数据(用户名和电子邮件)绑定(bind)到前端。但这行不通。我在这里做错了什么吗?
$scope.login = function() {
fbref.$authWithPassword({
email: $scope.email,
password: $scope.password
}).then(function(authData) {
$scope.userprofile = authData;
$state.go('tabsController.pendingTasks');
})
}
<div ng-controller="loginCtrl" class="card" ng-show="user">
<div class="item item-divider">Username: {{userprofile.email}}
</div>
<div class="item item-text-wrap">
{{userprofile.password.email}}
</div>
</div>
最佳答案
根据文档,成功回调返回一个包含字段 uid、provider、auth 和 expires 的对象。在该回调中放置一个断点或将其记录到控制台。
https://www.firebase.com/docs/web/api/firebase/authwithpassword.html
console.log('authData', authData);
关于angularjs - Ionic 应用程序 我已经遇到这个问题很长一段时间了,这是权限问题吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38223959/