Embedding Ionic App inside WeChat application

WeChat application can render html pages when web links are clicked, inside the app itself.
I am looking into rendering the Ionic app in the WeChat application. Is it possible to host Ionic app somewhere, and serve the pages with ionic serve and when people click the link in WeChat, they can see the Ionic app views ?

Is there any other way to do this ?

Interesting question

Found a way… Since Angularjs does the front-end work, and Ionic exists in its dependency list, all we need to do is dump the index.html file which includes all the scripts. Since, WeChat has inbuilt browser, and renders the Web App inside its own window, we just need a link to the web app. So click the URL and have the backend server dump the index.html with all the front-end scripts/files existing in the public folder of the backend app.

1 Like

Yes you can do that. Just serve Ionic framework’s www folder into any webserver, and then you can visit it in any browser, as well as wechat inapp browser.

For example, I made an ionic framework app and published it to http://m.huaqq.cn, you can just share this url to any friend, and then in the chat window you click the link. Then the ionic app will be running inside WeChat application.

Thank you very much! But now I have a question that troubles me. I have developed an app which uses existed database, I wonder that whether wechat could handle this?

This does nothing to do with wechat. You just connect your database in your project, wechat does not care about whethere you use database or not.

Inside your own project, you can connect your database using any server side programming language, Node JS also can do it.

Thank you for replying. Maybe my description is not very clear, I want to maintain database for every authorized client and save their databases into their own devices(this is easy for mobile apps through cordova plugins).
I wonder whether wechat/webpages process local database is possible or not. If not, could I use something instead?

Yes we can use local storage instead I think. Web browser has the local storage for storing data in the client side, and so does the wechat browser.

Further question. Does weChat has an angularJS library that we can implement share and weChat social login? It will be super cool if user inside wechat browser, click a botton and then signup inside our app - by getting wechat user name and email / or phone number…