【发布时间】:2016-07-06 12:26:11
【问题描述】:
登录应用程序后,我想将配置文件(前端)数据(用户名和电子邮件)绑定到前端。但这不起作用。我在这里做错了什么吗?
$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>
【问题讨论】:
-
$authWithPassword 不应该是 authWithPassword 吗?我不是火力基地的人,但快速搜索发现了这个firebase.com/docs/web/api/firebase/authwithpassword.html
-
我使用了 $authWithPassword 并且它有效。我只是无法在前端绑定。
-
所以 $scope.userprofile 被正确分配了吗?如果是这样,您将需要与我们分享更多代码,最好是 plunker 或 jsfiddle。
-
它是一个离子应用程序,它会在 jsfiddle 上运行吗?
标签: angularjs ionic-framework firebase