2016-09-02 15 views
5

Meteor v1.4 ve Angular2 rc-5 tabanlı bir uygulama yapıyorum. Şimdiye kadar tamam ama Firebase veritabanım ile entegre etmek gerekiyor ama ben istisna aşağıda olsun (Ben app Chrome üzerinde çalıştırıyorum). Benim tüm typescript iyi görünüyor ve ben herhangi bir hata almıyorum, benim Meteor uygulaması normal yükler, Adım 4 sonuna kadar Kurulum ve Kurulum öğretici takip etti. (Ancak Meteor kullanıyorum beri, ben köşeli kullanmadım -Proje oluşturmak için), herhangi bir fikrin nasıl düzeltileceğini? teşekkürlerAngularfire2: "location.protocol" http veya https (Meteor uygulaması) olmalıdır

EXCEPTION: Error: This operation is not supported in the environment this application is running on. 

"location.protocol" must be http or https and web storage must be enabled. 

BrowserDomAdapter.logError @ browser_adapter.js:84 
BrowserDomAdapter.logGroup @ browser_adapter.js:94 
ExceptionHandler.call @ exception_handler.js:65 
next @ application_ref.js:348 
schedulerFn @ async.js:89 
SafeSubscriber.__tryOrUnsub @ Subscriber.js:225 
SafeSubscriber.next @ Subscriber.js:174 
Subscriber._next @ Subscriber.js:124 
Subscriber.next @ Subscriber.js:88 
Subject._finalNext @ Subject.js:128 
Subject._next @ Subject.js:120 
Subject.next @ Subject.js:77 
EventEmitter.emit @ async.js:77 
onError @ ng_zone.js:124 
onHandleError @ ng_zone_impl.js:74 
ZoneDelegate.handleError @ zone.js:368 
Zone.runTask @ zone.js:297 
ZoneTask.invoke @ zone.js:464 

cevap

3

sadece 'http' veya 'https' için location.protocol ayarlamak için gerekir. Sınıfınıza aşağıdaki sağlayıcıyı ekleyerek bunu yapabilirsiniz.

providers: [{ 
    provide: WindowLocation, useValue: { 
     protocol: 'https' // Change to HTTP if you prefer. 
    } 
}] 

yazılı tarafından WindowLocation ithal etmeyi unutmayın:

import {WindowLocation} from "angularfire2"; 
İlgili konular