When it comes to import statements, the format is usually as follows:
import {HelpService} from '../../help.service'
It's worth noting that if I utilize autowiring to inject HelpService
into the constructor, an already existing instance of HelpService
is returned. However, if the import statement looks like this:
import {HelpService} from '../../help.service.js'
The result changes, and a fresh new instance of the service is received instead of the previous one. The question now arises: why does this switch in behavior occur?