diff options
author | Aryadev Chavali <aryadevchavali1@gmail.com> | 2019-02-18 17:10:27 +0000 |
---|---|---|
committer | Aryadev Chavali <aryadevchavali1@gmail.com> | 2019-02-18 17:10:27 +0000 |
commit | 98332d3d5032777e0b3ff5bec7dd4399dcd44ad1 (patch) | |
tree | b5d1b25df338e11710c5a88e83054c6818c1a9d4 | |
parent | dfc0de0520c10c523d1b08e8de9ebfccfad783c2 (diff) | |
download | newsaggregator-98332d3d5032777e0b3ff5bec7dd4399dcd44ad1.tar.gz newsaggregator-98332d3d5032777e0b3ff5bec7dd4399dcd44ad1.tar.bz2 newsaggregator-98332d3d5032777e0b3ff5bec7dd4399dcd44ad1.zip |
Made container hold entire unit
-rw-r--r-- | Website/scripts/main.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Website/scripts/main.ts b/Website/scripts/main.ts index d9c84a4..9f8862b 100644 --- a/Website/scripts/main.ts +++ b/Website/scripts/main.ts @@ -1,8 +1,6 @@ class Article { Container: HTMLElement; Title: HTMLElement; - Description: string; - ArticleLink: string; Image: HTMLElement; constructor(title: string, description: string, article_link: string, image_link: string) { @@ -17,6 +15,11 @@ class Article { link.setAttribute('href', article_link); this.Image.setAttribute('src', image_link); this.Image.setAttribute('title', description); + + // make unit + this.Title.appendChild(link); + this.Container.appendChild(this.Title); + this.Container.appendChild(this.Image); } } |