here is my library service:
import { Injectable } from '@angular/core';
@Injectable({ providedIn: 'root' })
export class SharedService {
name: string;
constructor(name) {
this.name = name;
}
}
when i do the build like : ng build
getting error as :
Compiling TypeScript sources through ngc
Warning: Can't resolve all parameters for SharedService in C:/722333/Tutorials/my-workspace/projects/ibo-shared-lib/src/lib/services/shared.service.ts: (?). This will become an error in Angular v6.x
Warning: Can't resolve all parameters for SharedService in C:/722333/Tutorials/my-workspace/projects/ibo-shared-lib/src/lib/services/shared.service.ts: (?). This will become an error in Angular v6.x
ERROR: Can't resolve all parameters for SharedService in C:/722333/Tutorials/my-workspace/projects/ibo-shared-lib/src/lib/services/shared.service.ts: (?).
how to fix this? what is the correct way to handle this? thanks in advance.
constructor(name: string)
? – Mridul