Reputation: 599
How can I import a component service from another component?
this is my project structure
I want to import "organization.service" on the user-form.component.
I tried
import { OrganizationService } from '.../organizations/shared/organization.service';
with no success, I get an error saying 'Cannot find module'
Thanks!
Upvotes: 0
Views: 31
Reputation: 1686
Try:
import { OrganizationService } from '../../organizations/shared/organization.service';
Two dots instead of three and you need to go up one more level.
Upvotes: 1