feat(module-template): add settings component

#1652
pull/1867/head
mehmet-erim 5 years ago
parent 5c1bcbb256
commit d7713ee308

@ -0,0 +1,9 @@
import { Component } from '@angular/core';
@Component({
selector: 'my-project-name-settings',
template: `
<h3>MyProjectName Settings</h3>
`,
})
export class MyProjectNameSettingsComponent {}

@ -1,10 +1,12 @@
import { NgModule, APP_INITIALIZER } from '@angular/core';
import { MyProjectNameConfigService } from './services/my-project-name-config.service';
import { noop } from '@abp/ng.core';
import { MyProjectNameSettingsComponent } from './components/my-project-name-settings.component';
@NgModule({
declarations: [],
declarations: [MyProjectNameSettingsComponent],
providers: [{ provide: APP_INITIALIZER, deps: [MyProjectNameConfigService], multi: true, useFactory: noop }],
exports: [],
exports: [MyProjectNameSettingsComponent],
entryComponents: [MyProjectNameSettingsComponent],
})
export class MyProjectNameConfigModule {}

@ -1,5 +1,7 @@
import { Injectable } from '@angular/core';
import { eLayoutType, addAbpRoutes, ABP } from '@abp/ng.core';
import { addSettingTab } from '@abp/ng.theme.shared';
import { MyProjectNameSettingsComponent } from '../components/my-project-name-settings.component';
@Injectable({
providedIn: 'root',
@ -12,5 +14,12 @@ export class MyProjectNameConfigService {
layout: eLayoutType.application,
order: 2,
} as ABP.FullRoute);
const route = addSettingTab({
component: MyProjectNameSettingsComponent,
name: 'MyProjectName Settings',
order: 1,
requiredPolicy: '',
});
}
}

@ -1,2 +1,3 @@
export * from './lib/components/my-project-name-settings.component';
export * from './lib/services/my-project-name-config.service';
export * from './lib/my-project-name-config.module';

Loading…
Cancel
Save