Using strophe with Ionic 2

524 views
Skip to first unread message

Paulo Vitor Justino Pereira

unread,
Oct 22, 2016, 10:05:14 PM10/22/16
to Strophe
I used strophe some time ago with Ionic 1, it was really simple, everything worked like a charm, you guys are awesome.
Now I am trying to use it with Ionic 2, which uses AngularJS 2 with TypeScript. When I try to import Strophe, after installing it with npm, it says it cannot be imported because it is not exported.

This is the import I'm using in my app.module.ts:

import { Strophe } from 'strophe.js';


Strophe is installed in project_folder/node_modules/strophe.js


And these are the messages I am getting:


ionic $ [23:02:09]  transpile update started ... 

[23:02:13]  typescript: src/pages/home/home.ts, line: 4 

            Module '"/Users/paulovitorjp/WebstormProjects/RTM-Messenger/src/app/app.module"' has no exported 

            member 'Strophe'. 


       L3:  import { NavController } from 'ionic-angular';

       L4:  import { Strophe } from "../../app/app.module";


[23:02:13]  transpile update failed 



Have you guys managed to use it with Ionic 2?


Thanks in advance!

Steffen Larsen

unread,
Oct 23, 2016, 7:29:37 AM10/23/16
to str...@googlegroups.com
Hi,

I’ve only been using Strophe (and stanza.io) in Ionic 1, and everything worked out great.  I found stanza.io better suited in the stack due to its event emitting etc.
I’ll try to upgrade to ionic2 and see how it works out (my project is quite similar to ionic2 layouts etc). 

/Steffen

--
You received this message because you are subscribed to the Google Groups "Strophe" group.
To unsubscribe from this group and stop receiving emails from it, send an email to strophe+u...@googlegroups.com.
To post to this group, send email to str...@googlegroups.com.
Visit this group at https://groups.google.com/group/strophe.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages