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


TypeScript angularfire2.firebaseAuthConfig函數代碼示例

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


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

示例1: main

export function main(initialHmrState?: any): Promise<any> {

  return bootstrap(App, [
    ...PROVIDERS,
    ...ENV_PROVIDERS,
    ...DIRECTIVES,
    ...PIPES,
    ...APP_PROVIDERS,
    FIREBASE_PROVIDERS,
    defaultFirebase('https://statistigs.firebaseio.com'),
    firebaseAuthConfig({
      provider: AuthProviders.Twitter,
      method: AuthMethods.Redirect
    })
  ])
  .catch(err => console.error(err));

}
開發者ID:Sacret,項目名稱:statistigs,代碼行數:18,代碼來源:main.browser.ts

示例2: ngApp

export function ngApp() {
  return bootstrap(App, [
    ...HTTP_PROVIDERS,
    FIREBASE_PROVIDERS,
    // Initialize Firebase app
    defaultFirebase({
      apiKey: "AIzaSyC75MzDIVaPQMX4T0RaJg6N5N5pE938dMA",
      authDomain: "portfolio-c9844.firebaseapp.com",
      databaseURL: "https://portfolio-c9844.firebaseio.com",
      storageBucket: "portfolio-c9844.appspot.com",
    }),
    firebaseAuthConfig({
      provider: AuthProviders.Password,
      method: AuthMethods.Password,
    }),
    provideRouter(routes)
  ]);
}
開發者ID:msegers,項目名稱:universal-starter,代碼行數:18,代碼來源:main.browser.ts

示例3: ngApp

export function ngApp(req, res) {
  let baseUrl = '/';
  let url = req.originalUrl || '/';

  let config: ExpressEngineConfig = {
    directives: [
      App
    ],
    platformProviders: [
      {provide: ORIGIN_URL, useValue: 'http://localhost:3000'},
      {provide: APP_BASE_HREF, useValue: baseUrl},
    ],
    providers: [
      {provide: REQUEST_URL, useValue: url},
      NODE_HTTP_PROVIDERS,
      provideRouter(routes),
      NODE_LOCATION_PROVIDERS,
      FIREBASE_PROVIDERS,
      // Initialize Firebase app
      defaultFirebase({
        apiKey: "AIzaSyC75MzDIVaPQMX4T0RaJg6N5N5pE938dMA",
        authDomain: "portfolio-c9844.firebaseapp.com",
        databaseURL: "https://portfolio-c9844.firebaseio.com",
        storageBucket: "portfolio-c9844.appspot.com",
      }),
      firebaseAuthConfig({
        provider: AuthProviders.Password,
        method: AuthMethods.Password,
      }),
    ],
    async: true,
    preboot: false // { appRoot: 'app' } // your top level app component selector
  };

  res.render('index', config);
}
開發者ID:msegers,項目名稱:universal-starter,代碼行數:36,代碼來源:main.node.ts

示例4: enableProdMode

import {HashLocationStrategy, LocationStrategy} from '@angular/common';
import {enableProdMode} from '@angular/core';
import {disableDeprecatedForms, provideForms} from '@angular/forms';
import {bootstrap} from '@angular/platform-browser-dynamic';
import {FIREBASE_PROVIDERS, defaultFirebase, firebaseAuthConfig} from 'angularfire2';

import {AppComponent} from './components/app/app.component';
import {APP_ROUTER_PROVIDERS} from './components/app/app.routes';
import {FIREBASE_AUTH_CONFIG, FIREBASE_CONFIG} from './configs/firebase.config';
import {AuthenticationService} from './services/authentication.service';
import {RoutingService} from './services/routing.service';
import {TaskListService} from './services/taskList.service';

if (process.env.ENV === 'production') {
  enableProdMode();
}

bootstrap(AppComponent as any, [
  FIREBASE_PROVIDERS,
  APP_ROUTER_PROVIDERS,
  {provide: LocationStrategy, useClass: HashLocationStrategy},
  defaultFirebase(FIREBASE_CONFIG),
  firebaseAuthConfig(FIREBASE_AUTH_CONFIG),
  disableDeprecatedForms(),
  provideForms(),
  AuthenticationService,
  RoutingService,
  TaskListService
]);
開發者ID:hanaum,項目名稱:choose_to_go,代碼行數:29,代碼來源:main.ts

示例5: enableProdMode

import { bootstrap } from '@angular/platform-browser-dynamic';
import { enableProdMode } from '@angular/core';
import { PruebasAppComponent, environment } from './app/';
import {FIREBASE_PROVIDERS, 
  defaultFirebase, 
  AngularFire, 
  AuthMethods, 
  AuthProviders, 
  firebaseAuthConfig} from 'angularfire2';

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

bootstrap(PruebasAppComponent, [
  FIREBASE_PROVIDERS,
  defaultFirebase('https://pruebasangular2.firebaseio.com/'),
  firebaseAuthConfig({
    provider: AuthProviders.Google,
    method: AuthMethods.Redirect
  })
]);

開發者ID:pacomar,項目名稱:pruebasangular2,代碼行數:22,代碼來源:main.ts

示例6: enableProdMode

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

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

bootstrap(Angularfire2IpponAppComponent, [
  FIREBASE_PROVIDERS,
  defaultFirebase('https://popping-fire-9851.firebaseio.com/'),
  firebaseAuthConfig({
    provider: AuthProviders.Twitter,
    method: AuthMethods.Redirect
  })
]);
開發者ID:qmonmert,項目名稱:angularfire2-ippon,代碼行數:17,代碼來源:main.ts

示例7: enableProdMode

import { bootstrap } from '@angular/platform-browser-dynamic';
import { enableProdMode, provide } from '@angular/core';
import { ROUTER_PROVIDERS } from '@angular/router';
import { HTTP_PROVIDERS, JSONP_PROVIDERS } from '@angular/http';
import { LocationStrategy, HashLocationStrategy } from '@angular/common';
import { NexusAppComponent, environment } from './app/';
import { FIREBASE_PROVIDERS, defaultFirebase, firebaseAuthConfig, AuthMethods, AuthProviders } from 'angularfire2';
import { ANGULAR2_GOOGLE_MAPS_PROVIDERS } from 'angular2-google-maps/core';

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

bootstrap(
  NexusAppComponent, [
    ROUTER_PROVIDERS,
    JSONP_PROVIDERS,
    HTTP_PROVIDERS,
    provide(LocationStrategy, {useClass: HashLocationStrategy}),
    FIREBASE_PROVIDERS,
    defaultFirebase('https://gdgnexus.firebaseio.com'),
    firebaseAuthConfig({
      method: AuthMethods.OAuthToken,
      provider: AuthProviders.Google
    }),
    ANGULAR2_GOOGLE_MAPS_PROVIDERS
  ]
);
開發者ID:leodufer,項目名稱:nexus,代碼行數:28,代碼來源:main.ts

示例8: defaultFirebase

	// Firebase Angular2 adapter
	FIREBASE_PROVIDERS,
	// angularfire2 beta 0
	// defaultFirebase("https://crackling-heat-2871.firebaseio.com"),
	// angularfire2 beta 2
	defaultFirebase({
		apiKey: "AIzaSyA0gBTBwU7x2m6dQVOormHdf8UnifI7Tu4",
		authDomain: "crackling-heat-2871.firebaseapp.com",
		databaseURL: "https://crackling-heat-2871.firebaseio.com", // "https://teacher-agenda-812ca.firebaseio.com"
		storageBucket: "crackling-heat-2871.appspot.com",
	}),
	// TODO test and replace by a better auth config
	firebaseAuthConfig({
		provider: AuthProviders.Password,
		method: AuthMethods.Password
		// scope: ['email']

		// If authenticated with same email, for different providers, they may be linked:
		// https://firebase.google.com/docs/auth/web/github-auth#popup-mode
	}),

	provide(TranslateLoader, {
		useFactory: (http: Http) => new TranslateStaticLoader(http, 'assets/i18n', '.json'),
		deps: [Http]
	}),
	// If the default behavior (fallback to default language, then to the key) is not good enough:
	// provide(MissingTranslationHandler, { useClass: MyMissingTranslationHandler }),
	TranslateService,

	// Global pipes
	// http://stackoverflow.com/questions/35044068/is-it-possible-to-override-the-built-in-angular-2-pipes-so-they-can-be-used-glob
	// For directives: https://forum.ionicframework.com/t/how-to-make-custom-pipes-application-wide/42843/10
開發者ID:architruc,項目名稱:teacher-agenda,代碼行數:32,代碼來源:injectables.ts

示例9: enableProdMode

         AuthProviders,
         FIREBASE_PROVIDERS, 
         firebaseAuthConfig,
         defaultFirebase } from 'angularfire2';
import { AppComponent, environment } from './app/';
import { APP_ROUTER_PROVIDER } from './app/app.routes';

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

bootstrap(AppComponent, [
  disableDeprecatedForms(),
  provideForms(),
  APP_ROUTER_PROVIDER,
  FIREBASE_PROVIDERS,
  // Initialize Firebase app  
  defaultFirebase({
    apiKey: "AIzaSyDiNHqJA8aBurA4huOeayaPxqAsK3iP-ys",
    authDomain: "angfire2-chat.firebaseapp.com",
    databaseURL: "https://angfire2-chat.firebaseio.com",
    storageBucket: "angfire2-chat.appspot.com",
  }),
  firebaseAuthConfig({
    provider: AuthProviders.Google,
    method: AuthMethods.Redirect,
    remember: 'default',
    scope: ['https://www.googleapis.com/auth/plus.login']
  })
]);;
開發者ID:OoogleBoogle,項目名稱:angfire2-chat,代碼行數:30,代碼來源:main.ts

示例10: enableProdMode

import { bootstrap } from '@angular/platform-browser-dynamic';
import { enableProdMode } from '@angular/core';
import { PoohAppComponent, environment } from './app/';
import { FIREBASE_PROVIDERS, 
  defaultFirebase, 
  AngularFire,
  AuthMethods,
  AuthProviders,
  firebaseAuthConfig } from 'angularfire2';

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

bootstrap(PoohAppComponent, [
  FIREBASE_PROVIDERS,
  defaultFirebase('https://pooh-8d41c.firebaseio.com/'), firebaseAuthConfig({
    provider: AuthProviders.Password,
    method: AuthMethods.Password
  }),
  
]);

開發者ID:ultish,項目名稱:pooh,代碼行數:22,代碼來源:main.ts


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