Is there a way to inject in a plugin constructor, a class provided by core-app ?
In fact I would like:
Have an abstract class
export declare abstract class IPluginComponent {
abstract methodDeclaredInCoreApp(first: String, last: String): String;
abstract anotherMethod(): any;
}
My plugin component which use the interface
constructor(private srvInterface: IPluginComponent) { }
public onSubmit() {
this.result = this.srvInterface.methodDeclaredInCoreApp(this.first, this.last);
}
And in the coreApp realize the IPluginComponent implementation
export class PluginInterface implements IPluginComponent {
methodDeclaredInCoreApp(first: String, last: String): String {
return first + ' @ ' + last;
}
anotherMethod(): any {
return 42;
}
}
Finally I've make some tries but it fails at runtime on
// compile module
const moduleFactory = await this._compiler.compileModuleAsync<any>(module["PluginAModule"]);
My console error :
Error: Can't resolve all parameters for PluginAComponent: (?).
Is there a way to inject in a plugin constructor, a class provided by core-app ?
In fact I would like:
Have an abstract class
My plugin component which use the interface
And in the coreApp realize the IPluginComponent implementation
Finally I've make some tries but it fails at runtime on
My console error :
Error: Can't resolve all parameters for PluginAComponent: (?).