我正在创建一个简单的示例auth应用程序,Ionic 2和angularfire 2作为后端,当我尝试创建新用户时,它说:
EXCEPTION:错误:未捕获(在承诺中):错误:未为此Firebase启用指定的身份验证提供程序.
但是我已经在firebase控制台中启用了firebase身份验证:
app.ts
import {App, Platform} from 'ionic-angular';
import {StatusBar} from 'ionic-native';
import {HomePage} from './pages/home/home';
import { FIREBASE_PROVIDERS, defaultFirebase, firebaseAuthConfig, AuthProviders, AuthMethods } from 'angularfire2';
@App({
template: '<ion-nav [root]="rootPage"></ion-nav>',
providers: [
FIREBASE_PROVIDERS,
defaultFirebase('https://samplequizapp-50eb5.firebaseio.com'),
firebaseAuthConfig({
provider: AuthProviders.Password,
method: AuthMethods.Password
})
],
config: {} // http://ionicframework.com/docs/v2/api/config/Config/
})
export class MyApp {
rootPage: any = HomePage;
constructor(platform: Platform) {
platform.ready().then(() => {
// Okay, so the platform is ready and our plugins are available.
// Here you can do …Run Code Online (Sandbox Code Playgroud) 我有一个情况,我必须把嵌套ng-repeat,当我试图得到的$id第一个ng-repeat我没有任何问题,但当我试图获得$id第二个ng-repeat(下图中标记为红色)我got undefined.
我的Firebase结构如下
HTML代码和控制器在这里
angular
.module('starter')
.controller('feedController', function($scope, $firebaseRef, $firebaseArray) {
$scope.allRequests = $firebaseArray($firebaseRef.requests);
$scope.allRequests.$loaded(function() {
console.log(arguments);
})
})Run Code Online (Sandbox Code Playgroud)
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
<span ng-repeat="items in allRequests">
<!-- this works fine -->
{{items.$id}}
<div ng-repeat="item in items">
<!-- getting undefined here... -->
{{item.$id}}
</div>
</span>Run Code Online (Sandbox Code Playgroud)
我需要$id第二ng-repeat,任何帮助将不胜感激.