Hi,

I'd like to retrieve data from MongoDB. Anywhere I search for something 
like this, I see an application divided into two parts - Client(angular2) 
and API(Express.js). Is this the only approach to this?

My idea is to create a service, in which I connect to database using 
Mongoose - connect() method, do something with data( find() etc. ), after 
it's retrieved, display them or do something else. Also same goes with all 
of 4 CRUD operations - create, read, update, delete. 

Is this a safe approach or do I have to create a separate API to not let 
user access it? (because in the end, all of the angular2 code is translated 
to pure javascript, uglified and bundled into one file).

If there is a way to not create two separate app components 
(api-server-side and client-side), I'd really appreciate to see an example 
of such implementation.

thanks

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to