3
A question for an expert in angular, for me to use a Scope in several controllers of a module, I can only with service(factory)
and or rootScope
? I’m in a bit of a bizarre situation. We have a project that the customer has a problem in the database, it takes on average 40 seconds for the bank to present a new data inputado in the call get. They want me to put the dry dice in the Cope of the other controllers, imagine, it’s going to be a lot of problems. In addition to Resources and the entity that makes the get/post, I will have to keep adding in the 'dry' the Scopes between the controllers, cruds, modulos
. It’s going to be a zone, full of Ctrl c and Ctrl v, someone has some hint for me to get out of this mess, it’s going to be awful :(.
If what you need is to share data across scopes, the ideal is to centralize that data into a service and the scopes only reflect that data. Sharing scopes is an anti-pattern.
– Guilherme Nagatomo