Browse Source

Update angular.md

pull/23275/head
Fahri Gedik 1 year ago
parent
commit
53149ef284
  1. 9
      docs/en/ui-themes/lepton-x-lite/angular.md

9
docs/en/ui-themes/lepton-x-lite/angular.md

@ -106,15 +106,16 @@ The **Layout components** and all the replacable components are predefined in `e
```js ```js
import { ReplaceableComponentsService } from '@abp/ng.core'; // imported ReplaceableComponentsService import { ReplaceableComponentsService } from '@abp/ng.core'; // imported ReplaceableComponentsService
import { eIdentityComponents } from '@abp/ng.identity'; // imported eIdentityComponents enum import { eIdentityComponents } from '@abp/ng.identity'; // imported eIdentityComponents enum
import { eThemeLeptonXComponents } from '@abp/ng.theme.lepton-x'; // imported eThemeLeptonXComponents enum import { eThemeLeptonXComponents } from '@abp/ng.theme.lepton-x'; // imported eThemeLeptonXComponents enum
import { Component, inject } from '@angular/core';
//... //...
@Component(/* component metadata */) @Component(/* component metadata */)
export class AppComponent { export class AppComponent {
constructor( private replaceableComponents = inject(ReplaceableComponentsService);
private replaceableComponents: ReplaceableComponentsService, // injected the service
) { constructor() {
this.replaceableComponents.add({ this.replaceableComponents.add({
component: YourNewApplicationLayoutComponent, component: YourNewApplicationLayoutComponent,
key: eThemeLeptonXComponents.ApplicationLayout, key: eThemeLeptonXComponents.ApplicationLayout,

Loading…
Cancel
Save