Преглед на файлове

docs: Fix example for registerCustomDetailComponent

Michael Bromley преди 2 години
родител
ревизия
e043db5a4c
променени са 1 файла, в които са добавени 8 реда и са изтрити 5 реда
  1. 8 5
      docs/content/plugins/extending-the-admin-ui/custom-detail-components/_index.md

+ 8 - 5
docs/content/plugins/extending-the-admin-ui/custom-detail-components/_index.md

@@ -48,11 +48,14 @@ export class ProductInfoComponent implements CustomDetailComponent, OnInit {
 }
 
 @NgModule({
-    imports: [SharedModule],
-    declarations: [ProductInfoComponent],
-    providers: [
-        registerCustomDetailComponent('product-detail', ProductInfoComponent),
-    ]
+  imports: [SharedModule],
+  declarations: [ProductInfoComponent],
+  providers: [
+    registerCustomDetailComponent({
+      locationId: 'product-detail',
+      component: ProductInfoComponent,
+    }),
+  ]
 })
 export class SharedExtensionModule {}
 ```