From c41a42296801672c8a219efba8fd0669beb901a2 Mon Sep 17 00:00:00 2001 From: Morgan McMillian Date: Tue, 13 Nov 2018 18:06:44 -0800 Subject: [PATCH] start building post component --- src/components/components.module.ts | 8 +++ src/components/post/post.html | 88 +++++++++++++++++++++++++++++ src/components/post/post.scss | 3 + src/components/post/post.ts | 22 ++++++++ 4 files changed, 121 insertions(+) create mode 100644 src/components/components.module.ts create mode 100644 src/components/post/post.html create mode 100644 src/components/post/post.scss create mode 100644 src/components/post/post.ts diff --git a/src/components/components.module.ts b/src/components/components.module.ts new file mode 100644 index 0000000..82f2129 --- /dev/null +++ b/src/components/components.module.ts @@ -0,0 +1,8 @@ +import { NgModule } from '@angular/core'; +import { PostComponent } from './post/post'; +@NgModule({ + declarations: [PostComponent], + imports: [], + exports: [PostComponent] +}) +export class ComponentsModule {} diff --git a/src/components/post/post.html b/src/components/post/post.html new file mode 100644 index 0000000..52f01e1 --- /dev/null +++ b/src/components/post/post.html @@ -0,0 +1,88 @@ + + + + + +

{{ post.user.name }}

+

@{{ post.user.username }}

+ +
+ {{ post.created_at | timeago }}
+ {{ post.source.name }} +
+
+
+ + +
+ +
+
+
+
+
+
{{ r.value.body }}
+
+
+
+
+
+ +
+
+
+ +
+ + + + + + +
+
+
+
+ +
+ {{ post.reposted_by_string }} +
+ + + + + + + + + + + + + + + + + + + + + diff --git a/src/components/post/post.scss b/src/components/post/post.scss new file mode 100644 index 0000000..437d298 --- /dev/null +++ b/src/components/post/post.scss @@ -0,0 +1,3 @@ +post { + +} diff --git a/src/components/post/post.ts b/src/components/post/post.ts new file mode 100644 index 0000000..0314501 --- /dev/null +++ b/src/components/post/post.ts @@ -0,0 +1,22 @@ +import { Component } from '@angular/core'; + +/** + * Generated class for the PostComponent component. + * + * See https://angular.io/api/core/Component for more info on Angular + * Components. + */ +@Component({ + selector: 'post', + templateUrl: 'post.html' +}) +export class PostComponent { + + text: string; + + constructor() { + console.log('Hello PostComponent Component'); + this.text = 'Hello World'; + } + +}