Angular Fullstack Application + Ionic for Web and App


#1

Hello,

I am building an web application with NodeJS and ExpressJS in the backend, MongoDB as my database and AngularJS for routing and as my templating engine in the frontend, additionally I use Sass. So it’s basically an Angular Fullstack application. I want to use Ionic for the CSS and JS effects, and - in future - I want to build an Android and an iOS app out of it. The app is basically the whole web application plus few ionic features (GPS tracking, eventually even push notifications in future).

I am sure there are plenty of people who want to do the same but I can’t find any solutions on the web for that issue. Only thing I could find is angular-fullstack-ionic-starter, which is in “the early stages” and as far as I understand, you have to write some parts of the code twice (once for the nodejs frontend, once for ionic)

What is the best way to do it? Is there anyone with a similar challenge who could find a solution?

Thanks so far!


#2

You can’t bolt Ionic onto your project, the best approach would be to build out your web application using a modular structure. So you can share modules between your web application and Ionic. Then built your iOS/Android application using Ionic including the modules you’ve created. This will save on the duplication of code.

Ionic is for device applications only, they’ve stated clearly in their documentation that it’s not intended for web applications as they don’t support browsers beyond Chrome and Safari.


#3

Thanks for your reply. That’s pretty much what I expected. Sounds like a plan, building modules which can be used by the app and the web application. I guess I will build NodeJS web services which will be used by the web application - so all the logic is on the server and I just need to use the web service on each platform, which is almost the same code as both are JavaScript based. I think that’s pretty much what you’ve advised!