Great! I'm definitely going to explore graphQL features - is it safe to work with it on client-side ?
And regarding Express.js server-side API - can you point me in a direction that works well with angular2 when it comes to authorization(user login interface api) and safe work with data in general ? Some sort of angular2-expressjs middleware Thanks again! Dňa pondelok, 3. októbra 2016 10:59:59 UTC+2 Luke napísal(-a): > > 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.
