aboutsummaryrefslogtreecommitdiff
path: root/Website/scripts/main.ts
diff options
context:
space:
mode:
authorAryadev Chavali <aryadevchavali1@gmail.com>2019-02-18 17:10:27 +0000
committerAryadev Chavali <aryadevchavali1@gmail.com>2019-02-18 17:10:27 +0000
commit98332d3d5032777e0b3ff5bec7dd4399dcd44ad1 (patch)
treeb5d1b25df338e11710c5a88e83054c6818c1a9d4 /Website/scripts/main.ts
parentdfc0de0520c10c523d1b08e8de9ebfccfad783c2 (diff)
downloadnewsaggregator-98332d3d5032777e0b3ff5bec7dd4399dcd44ad1.tar.gz
newsaggregator-98332d3d5032777e0b3ff5bec7dd4399dcd44ad1.tar.bz2
newsaggregator-98332d3d5032777e0b3ff5bec7dd4399dcd44ad1.zip
Made container hold entire unit
Diffstat (limited to 'Website/scripts/main.ts')
-rw-r--r--Website/scripts/main.ts7
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);
}
}