Skip to content
Snippets Groups Projects
Commit 78b6c07a authored by jojohoch's avatar jojohoch
Browse files

Convert StateVariable to interface

parent 9880a4cc
No related branches found
No related tags found
No related merge requests found
export class StateVariable {
export interface StateVariable {
id: string;
value: string;
constructor(id: string, value: string) {
this.id = id;
this.value = value;
}
}
......@@ -8,6 +8,6 @@ import { StateVariable } from 'common/models/state-variable';
templateUrl: './state-variable-editor.component.html'
})
export class StateVariableEditorComponent {
@Input() stateVariable: StateVariable = new StateVariable('', '');
@Input() stateVariable: StateVariable = { id: '', value: '' };
@Output() stateVariableChange = new EventEmitter<StateVariable>();
}
......@@ -13,7 +13,7 @@ export class StateVariablesDialogComponent {
}
addStateVariable() {
this.stateVariables.push(new StateVariable('NewState', '1'));
this.stateVariables.push({ id: 'NewState', value: '1' });
}
deleteStateVariable(index: number) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment