Angular - Services and Dependency Injection
Consider this Angular service:
If two components inject this service and each calls
@Injectable({ providedIn: 'root' })
export class ClickService {
clicks = 0;
registerClick() { this.clicks++; }
}If two components inject this service and each calls
registerClick() once, what will be the value of clicks in the service?