Skip to content

Instantly share code, notes, and snippets.

@rodrigolmacedo
Created February 17, 2020 20:02
Show Gist options
  • Select an option

  • Save rodrigolmacedo/bc6130b1db6aa02c226ca912c2c54f6d to your computer and use it in GitHub Desktop.

Select an option

Save rodrigolmacedo/bc6130b1db6aa02c226ca912c2c54f6d to your computer and use it in GitHub Desktop.
iew
class View {
constructor(elemento) {
this._elemento = elemento;
}
template() {
throw new Error('O metodo template deve ser implementado');
}
update(model) {
this._elemento.innerHTML = this.template(model);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment