So, I have this shared service file where a variable is defined like so:
export class SharedService {
activeModal: String;
}
Then, in my component file, I import the service and define it as follows:
constructor(public sharedService: SharedService) {
}
Within that component's template file, I am checking the value of the modal:
<div *ngIf="sharedService.activeModal === 'login'"></div>
Everything seems to be working fine, however, there is an issue in the editor. The expression `sharedService.activeModal === 'login'` has a red squiggly line underneath it, with a linting error message displayed when hovered over:
[Angular] Expected the operands to be of similar type or any
property sharedService of ModalComponent
Any suggestions on what might be going wrong here?