You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the Rocket.Chat.RealTime.API.RxJS to integrating with my existing ionic (3.7) mobile application. my application requirement is Rocket.chat direct message only.
Server Setup Information:
Version of Rocket.Chat Server: 0.59.1
Operating System: Ubuntu 14.04.5 LTS
Deployment Method: Docker
My sample Code
import { Component } from '@angular/core';
import { IonicPage, LoadingController, ToastController, MenuController, Platform } from 'ionic-angular';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { LoginServices } from '../../services/loginservices';
import { Storage } from '@ionic/storage';
import { Events } from 'ionic-angular';
import { Network } from '@ionic-native/network';
import { RealTimeAPI } from "rocket.chat.realtime.api.rxjs";
@IonicPage()
@Component({
selector: 'page-login',
templateUrl: 'login.html',
})
export class LoginPage {
loginData = { UserName: '', Password: '', RememberMe: false };
data: any;
loginForm: FormGroup;
isConnectionExists: boolean = true;
constructor(public authService: LoginServices, public loadingCtrl: LoadingController, private toastCtrl: ToastController, public fb: FormBuilder, public menuCtrl: MenuController, public storage: Storage, public events: Events, public platform: Platform, public network: Network) {
}
doLogin() {
if (this.loginForm.dirty && this.loginForm.valid) {
this.showLoader();
const realTimeAPI = new RealTimeAPI("ws://mydomain:3001/websocket");
realTimeAPI.keepAlive();
const auth = realTimeAPI.login(loginData.UserName, loginData.Password);
auth.subscribe(
(data) => console.log(data),
(err) => console.log(err),
() => console.log('completed'));
}
}
}
Screenshot of my console
Please any one help me on this.
The text was updated successfully, but these errors were encountered:
iruthaya
changed the title
obj is undefined response showing on login subscribe
obj is undefined error showing on login subscribe
Dec 20, 2017
I am using the Rocket.Chat.RealTime.API.RxJS to integrating with my existing ionic (3.7) mobile application. my application requirement is Rocket.chat direct message only.
Server Setup Information:
My sample Code
Screenshot of my console
Please any one help me on this.
The text was updated successfully, but these errors were encountered: