Product/components used and version/fix level:
Cumulocity Web UI 1015.0.452
Detailed explanation of the problem:
I want to integrate the Shell module to our custome device management application.
It basically works well by adding the modules DeviceShellModule and DeviceShellSharedModule to the imports list of NgModule in app.module.ts.
@NgModule({
imports: [
// Upgrade module must be the first
UpgradeModule,
// other modules
CommandTemplatesModule,
DeviceShellModule,
DeviceShellSharedModule
],
declarations: [
// our custom widgets
],
entryComponents: [
// our custom widgets
],
providers: [
//...
]
})
export class AppModule extends HybridAppModule {
constructor(protected upgrade: NgUpgradeModule) {
super();
}
}
I tried now to add the CommandTemplatesModule as well but it seems to require additional configuration since the console shows an error when you click the button predefined commands to open the dialog for the commands.
Error messages / full error message screenshot / log file:
core.js:6946 ERROR Error: [$injector:unpr] Unknown provider: c8yCommandTemplatesDirectiveProvider <- c8yCommandTemplatesDirective
http://errors.angularjs.org/1.6.9/$injector/unpr?p0=c8yCommandTemplatesDirectiveProvider%20%3C-%20c8yCommandTemplatesDirective
at eval (angular.js:116:12)
at eval (angular.js:4887:19)
at Object.getService [as get] (angular.js:5047:32)
at eval (angular.js:4892:45)
at Object.getService [as get] (angular.js:5047:32)
at UpgradeHelper.getDirective (upgrade-static.umd.js:1498:40)
at new UpgradeHelper (upgrade-static.umd.js:1495:57)
at new UpgradeComponent (upgrade-static.umd.js:1802:27)
at new CommandTemplates (c8y-ngx-components-device-shell.js:199:9)
at NodeInjectorFactory.CommandTemplates_Factory [as factory] (c8y-ngx-components-d…ice-shell.js:202:71)
I guess the provider for the command templates must be registered in some way I don’t understand yet. Is there some example code how it has to be used?
Thanks for your support!