phase-7: add reusable input-output widget library and default registry
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { HeroWidgetComponent, FooterNavigationWidgetComponent, ProductCarouselWidgetComponent } from '../ui';
|
||||
import { WidgetRegistryService } from './widget-registry.service';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class WidgetRegistryBootstrapService {
|
||||
constructor(private readonly registry: WidgetRegistryService) {}
|
||||
|
||||
registerDefaults(): void {
|
||||
this.registry.registerMany([
|
||||
{ type: 'hero', version: '1.0.0', component: HeroWidgetComponent },
|
||||
{ type: 'footer-navigation', version: '1.0.0', component: FooterNavigationWidgetComponent },
|
||||
{ type: 'product-carousel', version: '1.0.0', component: ProductCarouselWidgetComponent }
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user