- Architecting Angular Applications with Redux,RxJS,and NgRx
- Christoffer Noring
- 86字
- 2021-08-27 19:56:15
The service
We started this main section talking about how ES2015 modules are for all constructs in Angular. This section is about services, and services are no different when it comes to using ES2015 modules. Services we use should be declared in a separate file. If we intend to use a service, we need to import it. It needs to be imported for different reasons though, depending on what type of service it is. Services can be of two types:
- Services without dependencies
- Services with dependencies