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'; + } + +}