Currently, I am utilizing Angular 2/4 and have organized my code into feature modules. For instance, I have a Building Module and a Client Module.
https://i.stack.imgur.com/LvmkU.png
The same structure applies to my Client Feature Module as well.
Now, in my Building module, I require access to the ClientService in order to retrieve a list of Clients associated with the Building. Is it sufficient to import the Client Service like this?
import { BuildingService } from "../buildingservice";
import { ClientService } from "../../client/clientservice";
@Component({
selector: 'building-detail',
templateUrl: './building-detail.component.html',
providers: [BuildingService, ClientService]
})
export class BuildingDetailComponent extends ComponentBase {
constructor(private buildingService: BuildingService, private clientService: ClientService) {
super();
}
}
Would it be more appropriate to place my ClientService in a SharedServices folder, or is the current setup acceptable?