sahat/satellizer

The library thinks that when we are on a browser cordova will be undefined.

Open

#977 aperta il 24 set 2016

Vedi su GitHub
 (2 commenti) (0 reazioni) (0 assegnatari)TypeScript (1110 fork)github user discovery
hacktoberfest

Metriche repository

Star
 (7803 star)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

I think the reason that the library does not work on a browser with IONIC / cordova is the fact that it assumes that when we are on a browser this.$window['cordova'] will be undefined.

But actually this is not the case in an ionic project. On a browser platform, after we build and upload the application on a server cordova exists! So, if I am right and please correct me if I am wrong, in order to be able to use the library, you will need to replace in every if else condition (this.$window['cordova'] && this.$window['cordova'].platformId === "browser) in order to be able to work on a browser platform.

Guida contributor