本文整理匯總了TypeScript中angularfire2/angularfire2.firebaseAuthConfig函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript firebaseAuthConfig函數的具體用法?TypeScript firebaseAuthConfig怎麽用?TypeScript firebaseAuthConfig使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了firebaseAuthConfig函數的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: bootstrap
document.addEventListener('deviceready', () => {
bootstrap(EventFinderApp,
[
FIREBASE_PROVIDERS,
ROUTER_PROVIDERS,
defaultFirebase('https://sizzling-heat-4438.firebaseio.com'),
//storageBucket('gs://sizzling-heat-4438.appspot.com'),
firebaseAuthConfig({
method: AuthMethods.Redirect,
provider: AuthProviders.Password
}),
MyUsersService,
MyEventsService
]);
}, false);
示例2: main
export function main(): Promise<any> {
return bootstrap(AppComponent, [
...PLATFORM_PROVIDERS,
...ENV_PROVIDERS,
...AUTH_PROVIDERS,
...FIREBASE_PROVIDERS,
defaultFirebase({
apiKey: 'AIzaSyARs_f15bn2Zb0yBOB_MifZgufHTRzcY8A',
authDomain: 'ufc-oak.firebaseapp.com',
databaseURL: 'https://ufc-oak.firebaseio.com',
storageBucket: 'ufc-oak.appspot.com'
}),
firebaseAuthConfig({
provider: AuthProviders.Facebook,
method: AuthMethods.Popup,
scope: ['manage_pages', 'publish_pages']
}),
...APP_PROVIDERS,
])
.then(decorateComponentRef)
.catch(err => console.error(err));
}
示例3: enableProdMode
import {RouteConfig} from '@angular/router-deprecated';
import {MyUsersService} from './app/my-users.service';
import {MyEventsService} from './app/my-events.service';
import {
FIREBASE_PROVIDERS,
defaultFirebase,
AngularFire,
firebaseAuthConfig,
AuthMethods,
AuthProviders
} from 'angularfire2/angularfire2';
if (environment.production) {
enableProdMode();
}
//document.addEventListener('deviceready', () => {
bootstrap(EventFinderApp,
[
FIREBASE_PROVIDERS,
ROUTER_PROVIDERS,
defaultFirebase('https://sizzling-heat-4438.firebaseio.com'),
firebaseAuthConfig({
method: AuthMethods.Redirect,
provider: AuthProviders.Password
}),
MyUsersService,
MyEventsService
]);
//}, false);
示例4: defaultFirebase
import {FIREBASE_BASE_URL} from './firebase.constants';
import {FIREBASE_PROVIDERS, AuthMethods, firebaseAuthConfig, defaultFirebase} from 'angularfire2/angularfire2';
import {Auth} from './auth.service';
import {UsersStore} from './users.store.service';
import {AuthProviders} from 'angularfire2/angularfire2';
export const APP_FIREBASE_PROVIDERS = [
FIREBASE_PROVIDERS,
defaultFirebase(FIREBASE_BASE_URL),
firebaseAuthConfig({
method: AuthMethods.Password,
provider: AuthProviders.Password,
})
];
export const APP_AUTH_PROVIDERS = [
Auth, UsersStore
];
示例5: bootstrap
console.warn("DISPATCHED ACTION: ", val);
});
};
const stateLog: Middleware = (state: any) => {
return state.do((val: any) => {
console.info("NEW STATE: ", val);
});
};
bootstrap(WineCellarApp, [
ROUTER_PROVIDERS,
HTTP_PROVIDERS,
FIREBASE_PROVIDERS,
provide(APP_BASE_HREF, {useValue: "/"}),
provide(LocationStrategy, {useClass: HashLocationStrategy}),
defaultFirebase({
apiKey: "AIzaSyAq0nePnAWWJ_74KoCa8VIKrBkxqCB3eoU",
authDomain: "winecellar-50a24.firebaseapp.com",
databaseURL: "https://winecellar-50a24.firebaseio.com",
storageBucket: ""
}),
firebaseAuthConfig({
provider: AuthProviders.Password,
method: AuthMethods.Password,
remember: "default",
scope: ["email"]
}),
provideStore(store),
usePreMiddleware(actionLog),
usePostMiddleware(stateLog)
]);