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


TypeScript fire.AngularFireModule類代碼示例

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


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

示例1: beforeEach

 beforeEach(() => {
   TestBed.configureTestingModule({
     imports: [
       AngularFireModule.initializeApp(COMMON_CONFIG),
       AngularFireFunctionsModule
     ]
   });
   inject([FirebaseApp, AngularFireFunctions], (app_: FirebaseApp, _fn: AngularFireFunctions) => {
     app = app_;
     afFns = _fn;
   })();
 });
開發者ID:PaulD11,項目名稱:angularfire2,代碼行數:12,代碼來源:functions.spec.ts

示例2: beforeEach

 beforeEach(() => {
   TestBed.configureTestingModule({
     imports: [
       AngularFireModule.initializeApp(COMMON_CONFIG),
       AngularFireStorageModule
     ]
   });
   inject([FirebaseApp, AngularFireStorage], (app_: FirebaseApp, _storage: AngularFireStorage) => {
     app = app_;
     afStorage = _storage;
   })();
 });
開發者ID:PaulD11,項目名稱:angularfire2,代碼行數:12,代碼來源:storage.spec.ts

示例3: beforeEach

 beforeEach(() => {
   TestBed.configureTestingModule({
     imports: [
       AngularFireModule.initializeApp(COMMON_CONFIG),
       AngularFirestoreModule
     ]
   });
   inject([FirebaseApp, AngularFirestore], (_app: FirebaseApp, _afs: AngularFirestore) => {
     app = _app;
     afs = _afs;
   })();
 });
開發者ID:PaulD11,項目名稱:angularfire2,代碼行數:12,代碼來源:firestore.spec.ts

示例4: beforeEach

 beforeEach(() => {
   TestBed.configureTestingModule({
     imports: [
       AngularFireModule.initializeApp(COMMON_CONFIG, '[DEFAULT]'),
       AngularFireDatabaseModule
     ]
   });
   inject([FirebaseApp, AngularFireDatabase], (app_: FirebaseApp, _db: AngularFireDatabase) => {
     app = app_;
     db = _db;
   })();
 });
開發者ID:PaulD11,項目名稱:angularfire2,代碼行數:12,代碼來源:firebase_list_factory.spec.ts

示例5: beforeEach

 beforeEach(async(() => {
   TestBed.configureTestingModule({
     declarations: [ HomeComponent ],
     imports: [
       RouterTestingModule,
       FormsModule,
       AngularFireModule.initializeApp(environment.firebaseConfig),
       AngularFireDatabaseModule
     ],
     providers: [FirebaseService]
   })
   .compileComponents();
 }));
開發者ID:kbeelman,項目名稱:TokuCinema,代碼行數:13,代碼來源:home.component.spec.ts

示例6: beforeEach

 beforeEach(async(() => {
   TestBed.configureTestingModule({
     declarations: [ MediadetailsComponent, MediaGalleryComponent, NotFoundComponent ],
     imports: [
       FormsModule,
       RouterTestingModule,
       AngularFireModule.initializeApp(environment.firebaseConfig),
       AngularFireDatabaseModule
     ],
     providers: [FirebaseService]
   })
   .compileComponents();
 }));
開發者ID:kbeelman,項目名稱:TokuCinema,代碼行數:13,代碼來源:mediadetails.component.spec.ts

示例7: beforeEach

 beforeEach(() => {
   TestBed.configureTestingModule({
     imports: [
       AngularFireModule.initializeApp(COMMON_CONFIG, FIREBASE_APP_NAME),
       AngularFireDatabaseModule
     ]
   });
   inject([FirebaseApp, AngularFireDatabase, NgZone], (app_: FirebaseApp, _db: AngularFireDatabase, _zone: NgZone) => {
     app = app_;
     db = _db;
     zone = _zone;
   })();
 });
開發者ID:PaulD11,項目名稱:angularfire2,代碼行數:13,代碼來源:database.spec.ts

示例8: beforeEach

 beforeEach(() => {
   TestBed.configureTestingModule({
     imports: [
       AngularFireModule.initializeApp(COMMON_CONFIG, FIREBASE_APP_NAME),
       AngularFireDatabaseModule
     ]
   });
   inject([FirebaseApp], (app_: FirebaseApp) => {
     app = app_;
     app.database().goOffline();
     ref = (path: string) => { app.database().goOffline(); return app.database().ref(path); };
   })();
 });
開發者ID:PaulD11,項目名稱:angularfire2,代碼行數:13,代碼來源:fromRef.spec.ts

示例9: beforeEach

  beforeEach(() => {

    TestBed.configureTestingModule({
      imports: [AngularFireModule.initializeApp(COMMON_CONFIG, APP_NAME)]
    });

    inject([FirebaseApp, PlatformRef], (_app: FirebaseApp, _platform: PlatformRef) => {
      app = _app;
      rootRef = app.database!().ref();
      questionsRef = rootRef.child('questions');
      listOfQuestionsRef = rootRef.child('list-of-questions');
      defaultPlatform = _platform;
    })();

  });
開發者ID:PaulD11,項目名稱:angularfire2,代碼行數:15,代碼來源:angularfire2.spec.ts


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