Imagine if there are two distinct services in two separate project categories, both sharing the same name.
/app/services/category1/my.service.ts
:
@Injectable({
providedIn: 'root'
})
export class MyService {
foo() {
return 'foo';
}
}
/app/services/category2/my.service.ts
:
@Injectable({
providedIn: 'root'
})
export class MyService {
foo() {
return 'bar';
}
}
Would it be acceptable to have two different services with the same name while using providedIn: 'root'
?