自定义设置页面

不同的模块提供它们的设置选项卡. 你可以通过3个步骤在项目中自定义设置页面.

  1. 创建一个组件
  1. import { Select } from '@ngxs/store';
  2. import { Component } from '@angular/core';
  3. @Component({
  4. selector: 'app-your-custom-settings',
  5. template: `
  6. custom-settings works!
  7. `,
  8. })
  9. export class YourCustomSettingsComponent {
  10. // Your component logic
  11. }
  1. 添加 YourCustomSettingsComponentAppModule 中的 declarationsentryComponents 数组中.

  2. 打开 app.component.tsngOnInit 添加以下内容:

  1. import { addSettingTab } from '@abp/ng.theme.shared';
  2. // ...
  3. ngOnInit() {
  4. addSettingTab({
  5. component: YourCustomSettingsComponent,
  6. name: 'Type here the setting tab title (you can type a localization key, e.g: AbpAccount::Login',
  7. order: 4,
  8. requiredPolicy: 'type here a policy key'
  9. });
  10. }

导航到 /setting-management 路由你会看到以下变化:

Custom Settings Tab

下一步是什么?