Hey @jfinnigan. In that article, they are using AngularJS on the frontend not the backend, so you don’t use Angular with Node at all.
So, you’ll have a server running the background processing and serving data. In this case, you’ll be using Node.js for that, which you won’t use Angular for.
Then, on the client side, you’ll use AngularJS and Ionic. Ionic provides the UI and UI interactions. Angular provides the framework for building the client-side application and sending/receiving data to your backend Node server. Ionic has features that fit into the Angular way of doing things that you’ll want to use as well to make your life much easier.
Can I use ionic with express. I want to use RDBMS as backend datastore. I want to use express because it has got lot of plugins to communicate with RDMS such as mysql, sqlite etc. Also please do suggest if there is a way if we can drop express and get some RDMS plugin which resides on Node and angular can talk to that plugin and intern that plugin will persist data to backend datastore.
@joyhom, thanks for reply. I wanted to say the relation between angular and express only. But I want to know if I can use node-mysql without using express? So that my communication flow would be Ionic -> Angularjs --> nodemysql – > mysql DB. Hope its clear.
@bengtler “you want direct db access? But you need an API where you can send a request via $http from angular to your nodejs API and nodejs gets data out of your database”. Yes this exactly what I needed. Also I need DB access directly from angular. Can I put node-mysql or anyother adapter resides on nodejs independent of express and get the data out of DB ?
Thank you so much beng ! I really appreciate ellaborating in detail. I was successfully able create small todo app using Ionic / Angular <–> express <–> mongoose wrapped around NodeJs. Thanks much. Moving forward now
First of all, I’m noob on both ionic and nodejs so please be patient.
I have a question regarding the connection on a local host between ionic/angular and nodejs/express:
My client side is a slidemenu ionic app running for testing and developing on http://localhost:8100/#/app/ (after cmd ionic serve)
The server is a nodejs+express app running on http://localhost:8080/ with different REST api. (I use the backend for connecting with mongodb)
How do I connect the both of them? Because if a make a request from client as “api/users” I will get an connection error despite the fact that if I call it in browser (http://localhost:8080/api/user) I get the correct results.
Do I miss something?
codrinf can you share me your solution?Right now we are also using mean with ionic2 but i have doubt do we need to maintain two servers one is for nodjs and one is for ionic2.I can maintain two servers and i am able to get the data too but how can i deploy this to aws?