error message before export.
ERROR in src/app/hero.service.ts(15,2): error TS2554: Expected 0 arguments, but got 1.
Injectable in api has an optional parameter providedIn
I don"t know why, but who has encountered this problem?
ERROR in src/app/hero.service.ts(15,2): error TS2554: Expected 0 arguments, but got 1.
Injectable in api has an optional parameter providedIn
I don"t know why, but who has encountered this problem?
turns out to be a problem with angular. Angular5.x is referenced in the project, and there will be no errors if you upgrade to 6.x.
this providerIn parameter was introduced only in 6.