I have custom service class:
@Injectable()
export class CustomService {
constructor(num: number) {
}
}
This class is injected in constructor of component like this:
constructor(private cs: CustomService) {
}
But how to pass parameter num
to service in constructor described above?
Something like that:
constructor(private cs: CustomService(1)) {
}
I know as solution I can use Fabric pattern, but is there only one way to do that?