SHARE
TWEET

Untitled

a guest Jun 15th, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. export class Info {
  2.  
  3.     private currentId: number;
  4.  
  5.     private addToListButton: HTMLInputElement;
  6.  
  7.     constructor() {
  8.         this.currentId = +(<HTMLInputElement> document.getElementById("Example")).value;
  9.  
  10.         this.addToListButton = <HTMLInputElement> document.getElementById("addToList");
  11.  
  12.         this.registerEvents();
  13.     }
  14.  
  15.     private registerEvents(): void {
  16.         this.addToListButton.addEventListener("click", (() => this.addToList()));
  17.     }
  18.  
  19.     private addToList(): void {
  20.         var data: SomeModel;
  21.         data.id = this.currentId;
  22.  
  23.         // ajax stuff
  24.     }
  25. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top