Advertisement
Guest User

Untitled

a guest
Sep 18th, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.50 KB | None | 0 0
  1. Error: Uncaught (in promise): Error: No provider for GooglePlus!
  2. Error: No provider for GooglePlus!
  3. at injectionError (http://localhost:8100/build/vendor.js:1590:86)
  4. at noProviderError (http://localhost:8100/build/vendor.js:1628:12)
  5. at ReflectiveInjector_._throwOrNull (http://localhost:8100/build/vendor.js:3129:19)
  6. at ReflectiveInjector_._getByKeyDefault (http://localhost:8100/build/vendor.js:3168:25)
  7. at ReflectiveInjector_._getByKey (http://localhost:8100/build/vendor.js:3100:25)
  8. at ReflectiveInjector_.get (http://localhost:8100/build/vendor.js:2969:21)
  9. at AppModuleInjector.get (ng:///AppModule/module.ngfactory.js:332:145)
  10. at AppModuleInjector.getInternal (ng:///AppModule/module.ngfactory.js:615:44)
  11. at AppModuleInjector.NgModuleInjector.get (http://localhost:8100/build/vendor.js:3936:44)
  12. at LoginPageModuleInjector.NgModuleInjector.get (http://localhost:8100/build/vendor.js:3937:52)
  13. at c (http://localhost:8100/build/polyfills.js:3:13535)
  14. at Object.reject (http://localhost:8100/build/polyfills.js:3:12891)
  15. at NavControllerBase._fireError (http://localhost:8100/build/vendor.js:45902:16)
  16. at NavControllerBase._failed (http://localhost:8100/build/vendor.js:45890:14)
  17. at http://localhost:8100/build/vendor.js:45945:59
  18. at t.invoke (http://localhost:8100/build/polyfills.js:3:9283)
  19. at Object.onInvoke (http://localhost:8100/build/vendor.js:4508:37)
  20. at t.invoke (http://localhost:8100/build/polyfills.js:3:9223)
  21. at r.run (http://localhost:8100/build/polyfills.js:3:4452)
  22. at http://localhost:8100/build/polyfills.js:3:14076
  23.  
  24. import { Component } from '@angular/core';
  25. //import { GooglePlus } from '@ionic-native/google-plus';
  26. import { TranslateService } from '@ngx-translate/core';
  27. import { IonicPage, NavController, ToastController } from 'ionic-angular';
  28.  
  29. import { User } from '../../providers/providers';
  30. import { MainPage } from '../pages';
  31.  
  32. @IonicPage()
  33. @Component({
  34. selector: 'page-login',
  35. templateUrl: 'login.html'
  36. })
  37. export class LoginPage {
  38. // The account fields for the login form.
  39. // If you're using the username field with or without email, make
  40. // sure to add it to the type
  41. account: { username: string, password: string } = {
  42. username: '',
  43. password: ''
  44. };
  45.  
  46. // Our translated text strings
  47. private loginErrorString: string;
  48.  
  49. constructor(public navCtrl: NavController,
  50. public user: User,
  51. public toastCtrl: ToastController,
  52. public translateService: TranslateService,
  53. // private GooglePlus: GooglePlus
  54. ) {
  55.  
  56. this.translateService.get('LOGIN_ERROR').subscribe((value) => {
  57. this.loginErrorString = value;
  58. })
  59. }
  60.  
  61. // Attempt to login in through our User service
  62. doLogin() {
  63. this.user.login_basic(this.account).subscribe((resp) => {
  64. this.navCtrl.push(MainPage);
  65. }, (err) => {
  66. this.navCtrl.push(MainPage);
  67. // Unable to log in
  68. let toast = this.toastCtrl.create({
  69. message: this.loginErrorString,
  70. duration: 3000,
  71. position: 'top'
  72. });
  73. toast.present();
  74. });
  75. }
  76.  
  77. }
  78.  
  79. import { NgModule } from '@angular/core';
  80. import { GooglePlus } from '@ionic-native/google-plus';
  81. import { TranslateModule } from '@ngx-translate/core';
  82. import { IonicPageModule } from 'ionic-angular';
  83.  
  84. import { LoginPage } from './login';
  85.  
  86. @NgModule({
  87. declarations: [
  88. LoginPage,
  89. ],
  90. imports: [
  91. IonicPageModule.forChild(LoginPage),
  92. TranslateModule.forChild()
  93. ],
  94. exports: [
  95. LoginPage
  96. ],
  97. providers: [
  98. GooglePlus,
  99. ],
  100. })
  101. export class LoginPageModule { }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement