本文整理汇总了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'),
]);
示例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'
}
);
示例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'
});
示例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({
})
]);
示例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/')
]);
示例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
]);
示例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
// })
]);
示例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')
]);
示例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']
})
]);
示例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",
})
]);