[英]@ionic-native/google-maps - Environment is null running under browser platform
[英]Ionic google plus connect on browser platform
我目前正在制作基於Ionic的網絡應用。 我有一個登錄頁面,我想在該頁面上集成google connect。 我曾嘗試安裝離子本機Google Connect,但此版本不適用於瀏覽器平台,僅適用於iOS和Android。 我看到了這個插件: https : //www.npmjs.com/package/angular2-google-login我試圖安裝它,我按照說明進行操作,這是代碼:
import { AuthService, AppGlobals } from 'angular2-google-login';
constructor(private _googleAuth: AuthService){
}
googleLogin() {
this._googleAuth.authenticateUser(()=>{
});
}
問題出在node_modules目錄上。 所有模塊均為.JS
格式,但angular2-google-signin目錄中的文件為.TS
。 當我嘗試在瀏覽器上運行時出現此錯誤:
Error: ./~/angular2-google-login/index.ts Module build failed: Error: ENOENT: no such file or directory, open '/Desktop/Myproject/node_modules/angular2-google-login/index.js'
我找不到任何解決方案,可以將Angular解決方案放在瀏覽器平台上與Google進行登錄。。在此先感謝您的幫助
並非所有插件都打算在瀏覽器上運行,因為某些插件依賴於設備本機功能,例如SQLite database
, camera
等。您應該在移動設備上測試並運行您的應用。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.