OpenSlides/client/src/app/site/base-view-model.ts

20 lines
513 B
TypeScript
Raw Normal View History

import { BaseModel } from '../shared/models/base/base-model';
import { Displayable } from '../shared/models/base/displayable';
2018-09-10 15:53:11 +02:00
/**
* Base class for view models. alls view models should have titles.
*/
export abstract class BaseViewModel implements Displayable {
2018-09-10 15:53:11 +02:00
public abstract updateValues(update: BaseModel): void;
public abstract getTitle(): string;
2018-09-10 15:53:11 +02:00
public getListTitle(): string {
return this.getTitle();
2018-09-10 15:53:11 +02:00
}
public toString(): string {
return this.getTitle();
2018-09-10 15:53:11 +02:00
}
}