I am able to successfully compile the code in VS Code but I am getting this strange error in the browser console. Any suggestion? Am I missing anything here?
compiler.js:2193 Uncaught Error: Can't resolve all parameters for EventsListComponent: (?).
at syntaxError (compiler.js:2193)
at CompileMetadataResolver._getDependenciesMetadata (compiler.js:17643)
at CompileMetadataResolver._getTypeMetadata (compiler.js:17539)
at CompileMetadataResolver.getNonNormalizedDirectiveMetadata (compiler.js:17168)
at CompileMetadataResolver.loadDirectiveMetadata (compiler.js:17031)
at compiler.js:24236
at Array.forEach ()
at compiler.js:24235
at Array.forEach ()
at JitCompiler._loadModules (compiler.js:24232)
You can consider the EVENTS has some hardcoded values in it.
event.service.ts:
import { Injectable } from "@angular/core";
@Injectable()
export class EventService {
getEvents() {
// tslint:disable-next-line: no-use-before-declare
return EVENTS;
}
}
I have no clue how this issue was resolved but I just deleted everything and created the files from the scratch with the same code snippet and it started working fine.
I am able to successfully compile the code in VS Code but I am getting this strange error in the browser console. Any suggestion? Am I missing anything here?
compiler.js:2193 Uncaught Error: Can't resolve all parameters for EventsListComponent: (?). at syntaxError (compiler.js:2193) at CompileMetadataResolver._getDependenciesMetadata (compiler.js:17643) at CompileMetadataResolver._getTypeMetadata (compiler.js:17539) at CompileMetadataResolver.getNonNormalizedDirectiveMetadata (compiler.js:17168) at CompileMetadataResolver.loadDirectiveMetadata (compiler.js:17031) at compiler.js:24236 at Array.forEach ()
at compiler.js:24235
at Array.forEach ()
at JitCompiler._loadModules (compiler.js:24232)
event.service.ts:
events-list.component.ts
app.module.ts