Browse Source

Merge pull request #23946 from abpframework/issue/fix-manage-profile-page-tabs-doc

Angular - Fixing manage profile page tabs document
pull/23948/head
Fahri Gedik 8 months ago
committed by GitHub
parent
commit
2520a69dfc
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 13
      docs/en/framework/ui/angular/manage-profile-page-tabs.md

13
docs/en/framework/ui/angular/manage-profile-page-tabs.md

@ -9,13 +9,12 @@ See the example below, covers all features:
```ts
// manage-profile-tabs.provider.ts
import { provideAppInitializer, Component } from "@angular/core";
import { Component, inject, provideAppInitializer } from "@angular/core";
import { TwoFactorTabComponent } from "@volo/abp.ng.account/public";
import {
eAccountManageProfileTabNames,
ManageProfileTabsService,
} from "@volo/abp.ng.account/public/config";
import { MyAwesomeTabComponent } from "./my-awesome-tab/my-awesome-tab.component";
@Component({
selector: "abp-my-awesome-tab",
@ -23,14 +22,14 @@ import { MyAwesomeTabComponent } from "./my-awesome-tab/my-awesome-tab.component
})
class MyAwesomeTabComponent {}
export const MANAGE_PROFILE_TAB_PROVIDER = {
provideAppInitializer(()=>{
export const MANAGE_PROFILE_TAB_PROVIDER = [
provideAppInitializer(() => {
configureManageProfileTabs();
}),
};
];
export function configureManageProfileTabs() {
tabs = inject(ManageProfileTabsService);
const tabs = inject(ManageProfileTabsService);
tabs.add([
{
name: "::MyAwesomeTab", // supports localization keys
@ -56,7 +55,7 @@ import { MANAGE_PROFILE_TAB_PROVIDER } from "./manage-profile-tabs.provider";
export const appConfig: ApplicationConfig = {
providers: [
// ...
MANAGE_PROFILE_TAB_PROVIDER
MANAGE_PROFILE_TAB_PROVIDER,
],
};
```

Loading…
Cancel
Save