refactor: base members to be abstract as default values are senseless
This commit is contained in:
@@ -19,8 +19,8 @@ import { SettingsBaseAdd } from '../settings-base-add/settings-base-add';
|
|||||||
})
|
})
|
||||||
export class ChainAdd extends SettingsBaseAdd {
|
export class ChainAdd extends SettingsBaseAdd {
|
||||||
private readonly chainSettings = inject(ChainSettings);
|
private readonly chainSettings = inject(ChainSettings);
|
||||||
override readonly form = new ChainFormGroup();
|
readonly form = new ChainFormGroup();
|
||||||
override title = 'settings.chain.new_chain';
|
title = 'settings.chain.new_chain';
|
||||||
|
|
||||||
async save() {
|
async save() {
|
||||||
const name = this.form.controls.name.value;
|
const name = this.form.controls.name.value;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { FormGroup } from '@angular/forms';
|
import { FormGroup } from '@angular/forms';
|
||||||
|
|
||||||
export abstract class SettingsBaseAdd {
|
export abstract class SettingsBaseAdd {
|
||||||
title = '';
|
abstract title: string;
|
||||||
form = new FormGroup({})
|
abstract form: FormGroup;
|
||||||
|
|
||||||
protected abstract save(): Promise<void>
|
protected abstract save(): Promise<void>
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user