Answer the question
In order to leave comments, you need to log in
Is there a "service"?
Sorry if the question is stupid.
I'm learning angular, and at the same time, I'm looking at node.js. In angular, there is the concept of a service for transferring data between controllers, and, in general, by all entities. Is there such a thing in nodejs?
Let me explain (I'll try). I have a bilingual application, I store title : { ru : 'Title', en : 'title'} in the database and I want the server controller to pull either ru or en, depending on the existing language. Is it possible to create some kind of service in node, so that in each controller it is not necessary to find out "what language does the user currently have?". Or I connect some kind of c file to each controller
exports.language = function (req, res) {
var currentLanguage = .... }
, var language = require('файл с определением языка')
Answer the question
In order to leave comments, you need to log in
In angular there is a concept of a service for passing data between controllers
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question