@@ -48,21 +48,12 @@ import { CommonModule } from '@angular/common';
4848import { KITTEN_ROUTES } from 'core-app/features/plugins/linked/openproject-proto_plugin/kitten.routes' ;
4949import { KittenPageComponent } from 'core-app/features/plugins/linked/openproject-proto_plugin/kitten-page/kitten-page.component' ;
5050import { kittenAction } from 'core-app/features/plugins/linked/openproject-proto_plugin/context-menu' ;
51+ import { registerCustomElement } from 'core-app/shared/helpers/angular/custom-elements.helper' ;
5152
5253export function initializeProtoPlugin ( injector :Injector ) {
5354 return ( ) => {
5455 const hookService = injector . get ( HookService ) ;
5556
56- // Explicitly bootstrap the kitten component in the DOM if it is found
57- // Angular would otherwise only bootstrap the global entry point bootstrap from the core
58- // preventing us from using components like this kitten component
59- hookService . register ( 'openProjectAngularBootstrap' , ( ) => {
60- return [
61- { selector : 'kitten-component' , cls : KittenComponent } ,
62- ] ;
63- } ) ;
64-
65- // Register action menu
6657 hookService . register ( 'workPackageSingleContextMenu' , ( ) => kittenAction ) ;
6758 hookService . register ( 'workPackageTableContextMenu' , ( ) => kittenAction ) ;
6859 } ;
@@ -90,4 +81,7 @@ export function initializeProtoPlugin(injector:Injector) {
9081 ] ,
9182} )
9283export class PluginModule {
84+ constructor ( injector :Injector ) {
85+ registerCustomElement ( 'opce-kitten' , KittenComponent , { injector } ) ;
86+ }
9387}
0 commit comments