Advertisement
Guest User

Untitled

a guest
Mar 27th, 2017
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. abstract class View<T> {
  2.  
  3. private _elemento: HTMLElement;
  4.  
  5. constructor(private selector: string) {
  6.  
  7. this._elemento = <HTMLElement>document.querySelector(selector);
  8. }
  9.  
  10. abstract template(model: T): string;
  11.  
  12. update(model: T) {
  13.  
  14. this._elemento.innerHTML = this.template(model);
  15. }
  16. }
  17.  
  18. export default View;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement