當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript angularfire2.defaultFirebase函數代碼示例

本文整理匯總了TypeScript中angularfire2.defaultFirebase函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript defaultFirebase函數的具體用法?TypeScript defaultFirebase怎麽用?TypeScript defaultFirebase使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了defaultFirebase函數的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: constructor

            </div>
            
            <button (click)="addTask(newTask)" class=" ui positive right button" >
                Add
            </button>        
        </form>  
    `
})
class App {  

    tasks: FirebaseListObservable<any[]>;
    //tasks: Observable<any[]>;
    constructor(af: AngularFire){
        this.tasks = af.list('/tasks');
    } 
    
    addTask(task : HTMLInputElement): void {
    
        console.log(`Adding article title: ${task.value} `);
        
        this.tasks.add(task.value);

    }
}

bootstrap(App, [
    FIREBASE_PROVIDERS,
    defaultFirebase('https://angular2-firebase-sample.firebaseio.com'),
]);

開發者ID:UsairimIsani,項目名稱:angular2-firebase-sample,代碼行數:29,代碼來源:app.ts

示例2: ionicBootstrap

import { ionicBootstrap } from 'ionic-angular';
import { AppComponent } from './app.component';
import { FIREBASE_PROVIDERS, defaultFirebase } from 'angularfire2';

ionicBootstrap(
    AppComponent,
    [
        FIREBASE_PROVIDERS,
        defaultFirebase({
            apiKey: "AIzaSyAtyYzFCPl5jKfMoMPlDMPnNfN8-HDKxkI",
            authDomain: "mtkeasyinfo.firebaseapp.com",
            databaseURL: "https://mtkeasyinfo.firebaseio.com",
            storageBucket: "mtkeasyinfo.appspot.com",
        })
    ],
    {
        iconMode:'ios',
        pageTransition: 'ios',
        backButtonIcon:'ios-arrow-back'
    }
);
開發者ID:eriyu,項目名稱:angular2-ionic2-webpack,代碼行數:21,代碼來源:main.ts

示例3: checkSession

  }

  checkSession(){
    this.authService.session.subscribe(session =>{
      this.rootPage = this.getPageInit(session);
    })
  }

  getPageInit(session):any{
    if (session) return TabsPage;
    return LoginPage;
  }
}

ionicBootstrap(MyApp, [
  AuthService,
  FIREBASE_PROVIDERS,
  defaultFirebase({
    apiKey: "AIzaSyCAJYjqPbfeBijP8skiDRz0mNn-Q3LYcuw",
    authDomain: "instagram-8fe0a.firebaseapp.com",
    databaseURL: "https://instagram-8fe0a.firebaseio.com",
    storageBucket: "instagram-8fe0a.appspot.com",
  }),
  firebaseAuthConfig({
    provider: AuthProviders.Password,
    method: AuthMethods.Password
  })
], {
  mode: 'ios'
});
開發者ID:EscuelaIt,項目名稱:class-10-demo,代碼行數:30,代碼來源:app.ts

示例4: enableProdMode

import { bootstrap } from '@angular/platform-browser-dynamic';
import { enableProdMode } from '@angular/core';
import { AppComponent, environment } from './app/';
import { FIREBASE_PROVIDERS, defaultFirebase } from 'angularfire2';

if (environment.production) {
  enableProdMode();
}

bootstrap(AppComponent, [
  FIREBASE_PROVIDERS,
  // Initialize Firebase app  
  defaultFirebase({

  })
]);
開發者ID:aaronksaunders,項目名稱:afwithngcli,代碼行數:16,代碼來源:main.ts

示例5: enableProdMode

import { bootstrap } from '@angular/platform-browser-dynamic';
import { enableProdMode } from '@angular/core';
import { FlexchatAppComponent, environment } from './app/';
import { FIREBASE_PROVIDERS, defaultFirebase } from 'angularfire2';

if (environment.production) {
  enableProdMode();
}

bootstrap(FlexchatAppComponent, [
  FIREBASE_PROVIDERS,
  defaultFirebase('https://flexchat.firebaseio.com/')
]);
開發者ID:ralon039,項目名稱:firebase-angular2-demo,代碼行數:13,代碼來源:main.ts

示例6: enableProdMode

import {bootstrap} from '@angular/platform-browser-dynamic';
import {enableProdMode} from '@angular/core';
import {AppComponent, environment} from './app/';
import {appRouterProviders} from './app/app.routes';
import {FIREBASE_PROVIDERS, defaultFirebase} from 'angularfire2';

if (environment.production) {
    enableProdMode();
}

bootstrap(AppComponent, [
    FIREBASE_PROVIDERS,
    // Initialize Firebase app
    defaultFirebase({
        apiKey: "AIzaSyD16CS8u7faSGfQqxYQcElkK5jBw9DgUWA",
        authDomain: "crispycorpse-cc58e.firebaseapp.com",
        databaseURL: "https://crispycorpse-cc58e.firebaseio.com",
        storageBucket: "crispycorpse-cc58e.appspot.com"
    }),
    appRouterProviders
]);

開發者ID:aortyl,項目名稱:crispy-writer,代碼行數:21,代碼來源:main.ts

示例7: enableProdMode

import { HTTP_PROVIDERS } from '@angular/http';

import { FIREBASE_PROVIDERS, defaultFirebase, 
  // AuthMethods, 
  // AuthProviders, 
  // firebaseAuthConfig
} from 'angularfire2';

import { FirebaseDataService } from './app/firebase-data.service';

if (environment.production) {
  enableProdMode();
}

bootstrap(AppComponent, [
  APP_ROUTER_PROVIDERS,
  FirebaseDataService,
  HTTP_PROVIDERS,
  FIREBASE_PROVIDERS,
  defaultFirebase({
    apiKey: "AIzaSyDJplHLR1-jfcBB7_KyvgJ8MXawdG1Kl9E",
    authDomain: "ur-coursesniper-e2a0d.firebaseapp.com",
    databaseURL: "https://ur-coursesniper-e2a0d.firebaseio.com",
    storageBucket: "",
  }),
  // firebaseAuthConfig({
  //   provider: AuthProviders.Anonymous,
  //   method: AuthMethods.Anonymous
  // })
]);
開發者ID:raayanpillai,項目名稱:ur-coursesniper,代碼行數:30,代碼來源:main.ts

示例8: enableProdMode

import { bootstrap } from '@angular/platform-browser-dynamic';
import { enableProdMode } from '@angular/core';
import { KarubaHelperAppComponent, environment } from './app/';
import { FIREBASE_PROVIDERS, defaultFirebase } from 'angularfire2';

if (environment.production) {
  enableProdMode();
}

bootstrap(KarubaHelperAppComponent, [
  FIREBASE_PROVIDERS,
  defaultFirebase('https://karubahelper.firebaseio.com')
]);
開發者ID:TheWrightDev,項目名稱:KarubaHelper,代碼行數:13,代碼來源:main.ts

示例9: bootstrap

import { bootstrap } from '@angular/platform-browser-dynamic';
import { FIREBASE_PROVIDERS, defaultFirebase, firebaseAuthConfig, AuthProviders, AuthMethods } from 'angularfire2';
import { App } from './app/authState.component';
import { disableDeprecatedForms, provideForms } from '@angular/forms';


bootstrap(App, [
  FIREBASE_PROVIDERS,
  disableDeprecatedForms(),
    provideForms(),
  // Initialize Firebase app  
  defaultFirebase({
    apiKey: "AIzaSyD62AjtNiXO4eAhXTa6v-g1JmjVeT58tLY",
    authDomain: "trivia-37669.firebaseapp.com",
    databaseURL: "https://trivia-37669.firebaseio.com",
    storageBucket: "trivia-37669.appspot.com",
  }),
  firebaseAuthConfig({
    provider: AuthProviders.Password,
    method: AuthMethods.Password,
    remember: 'default',
    scope: ['email']
  })
]);
開發者ID:JSpell,項目名稱:angular2-firebase,代碼行數:24,代碼來源:main.ts

示例10: enableProdMode

import { bootstrap } from '@angular/platform-browser-dynamic';
import { enableProdMode } from '@angular/core';
import { HTTP_PROVIDERS } from '@angular/http';
import { AppComponent, environment } from './app/';
import { FIREBASE_PROVIDERS, defaultFirebase } from 'angularfire2';


if (environment.production) {
  enableProdMode();
}

bootstrap(AppComponent, [
  FIREBASE_PROVIDERS,
  HTTP_PROVIDERS,
  // Initialize Firebase app  
  defaultFirebase({
    apiKey: "AIzaSyB_8T55Bj61b0SNXfGl6xFm76nuaqvbLyI",
    authDomain: "businessapp-35641.firebaseapp.com",
    databaseURL: "https://businessapp-35641.firebaseio.com",
    storageBucket: "businessapp-35641.appspot.com",
  })
]);

開發者ID:loicbrigardis,項目名稱:angular2-firebase,代碼行數:22,代碼來源:main.ts


注:本文中的angularfire2.defaultFirebase函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。