Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- abstract class View<T> {
- private _elemento: HTMLElement;
- constructor(private selector: string) {
- this._elemento = <HTMLElement>document.querySelector(selector);
- }
- abstract template(model: T): string;
- update(model: T) {
- this._elemento.innerHTML = this.template(model);
- }
- }
- export default View;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement