mean-expert-official / loopback-sdk-builder

Tool for auto-generating Software Development Kits (SDKs) for LoopBack
Other
399 stars 178 forks source link

Use loopback-sdk-builder for web and ionic at same time #474

Open favrePoupou opened 7 years ago

favrePoupou commented 7 years ago

What type of issue are you creating?

What version of this module are you using?

Write other if any:

Please add a description for your issue:

Hi everybody, here I send you my architecture. I plan to build an app with ionic but want to make an admin page for desktop. For that I have 2 folders client-ionic from where the sdk builder is linked, but i want to access to my back end model also on the Client folder which is an ng project. Is that possible or how you do when you need to do that kind of things? Thank you questions

jonathan-casarrubias commented 7 years ago

Hi @favrePoupou thanks for reaching out,

Hey so, I see you are creating an SDK using the ng2universal flag... That is for Angular Universal (Backend Rendering) and will not work on Ionic environment.

For ionic you can use the ng2web and you might be able to use the same SDK in a web or ionic

favrePoupou commented 7 years ago

Hi Jonathan, Thank you for your answer, I was building my app in 2 parts like the image below as running 2 commands when i want to build my app as: 1) npm run build:sdk-ionic 2)npm run build:sdk-client And then I build my app for the ng project and also the ionic project (2 fronts for the same database). It is working fine and I hope that this is a good practice ;-) Let me know if this is definitely the way or if it is not a good practice. Thanks again

sdk

jonathan-casarrubias commented 7 years ago

@favrePoupou that seems to be fine, just make sure your sdk-client is actually an angular universal environment, if this is the case then everything seems to be fine, if you are not using angular universal, well the SDK will contain a footprint of code related to universal that might not be used at all..