Getting ready to load in the posts json file.
This commit is contained in:
parent
31921e1db9
commit
e5df503d1a
@ -7,13 +7,17 @@ import { AppRoutingModule } from './app-routing.module';
|
||||
import { HomeComponent } from './components/home/home.component';
|
||||
import { ProjectsComponent } from './components/projects/projects.component';
|
||||
import { ProjectComponent } from './components/project/project.component';
|
||||
import { PostsComponent } from './components/posts/posts.component';
|
||||
import { PostComponent } from './components/post/post.component';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AppComponent,
|
||||
HomeComponent,
|
||||
ProjectsComponent,
|
||||
ProjectComponent
|
||||
ProjectComponent,
|
||||
PostsComponent,
|
||||
PostComponent
|
||||
],
|
||||
imports: [
|
||||
BrowserModule,
|
||||
|
||||
3
src/app/components/post/post.component.html
Normal file
3
src/app/components/post/post.component.html
Normal file
@ -0,0 +1,3 @@
|
||||
<p>
|
||||
post works!
|
||||
</p>
|
||||
@ -1,20 +1,20 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ProjectComponent } from './project.component';
|
||||
import { PostComponent } from './post.component';
|
||||
|
||||
describe('ProjectComponent', () => {
|
||||
let component: ProjectComponent;
|
||||
let fixture: ComponentFixture<ProjectComponent>;
|
||||
describe('PostComponent', () => {
|
||||
let component: PostComponent;
|
||||
let fixture: ComponentFixture<PostComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ ProjectComponent ]
|
||||
declarations: [ PostComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ProjectComponent);
|
||||
fixture = TestBed.createComponent(PostComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
15
src/app/components/post/post.component.ts
Normal file
15
src/app/components/post/post.component.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-post',
|
||||
templateUrl: './post.component.html',
|
||||
styleUrls: ['./post.component.css']
|
||||
})
|
||||
export class PostComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
||||
3
src/app/components/posts/posts.component.html
Normal file
3
src/app/components/posts/posts.component.html
Normal file
@ -0,0 +1,3 @@
|
||||
<p>
|
||||
posts works!
|
||||
</p>
|
||||
@ -1,20 +1,20 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ProjectsComponent } from './projects.component';
|
||||
import { PostsComponent } from './posts.component';
|
||||
|
||||
describe('ProjectsComponent', () => {
|
||||
let component: ProjectsComponent;
|
||||
let fixture: ComponentFixture<ProjectsComponent>;
|
||||
describe('PostsComponent', () => {
|
||||
let component: PostsComponent;
|
||||
let fixture: ComponentFixture<PostsComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ ProjectsComponent ]
|
||||
declarations: [ PostsComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ProjectsComponent);
|
||||
fixture = TestBed.createComponent(PostsComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
15
src/app/components/posts/posts.component.ts
Normal file
15
src/app/components/posts/posts.component.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-posts',
|
||||
templateUrl: './posts.component.html',
|
||||
styleUrls: ['./posts.component.css']
|
||||
})
|
||||
export class PostsComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,6 +0,0 @@
|
||||
<h3>
|
||||
<ng-content select=".title"></ng-content>
|
||||
</h3>
|
||||
<p>
|
||||
<ng-content select=".content"></ng-content>
|
||||
</p>
|
||||
@ -1,15 +0,0 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'project',
|
||||
templateUrl: './project.component.html',
|
||||
styleUrls: ['./project.component.css']
|
||||
})
|
||||
export class ProjectComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,10 +0,0 @@
|
||||
<p>These are the projects I have completed, am working on, got tired of... consider this to be a resume of work and hobbies. And also a little notebook for myself, in case I forget the specifics.</p>
|
||||
|
||||
<project>
|
||||
<div class="title">
|
||||
The title of the project :)
|
||||
</div>
|
||||
<div class="content">
|
||||
this is inner content of the project
|
||||
</div>
|
||||
</project>
|
||||
@ -1,15 +0,0 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-projects',
|
||||
templateUrl: './projects.component.html',
|
||||
styleUrls: ['./projects.component.css']
|
||||
})
|
||||
export class ProjectsComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
||||
BIN
src/assets/images/baby-duck.jpg
Normal file
BIN
src/assets/images/baby-duck.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 108 KiB |
@ -1,6 +1,7 @@
|
||||
[
|
||||
{
|
||||
"title":"First post",
|
||||
"id":1
|
||||
"projects": [
|
||||
"test"
|
||||
]
|
||||
}
|
||||
]
|
||||
3
src/assets/posts/projects/1.html
Normal file
3
src/assets/posts/projects/1.html
Normal file
@ -0,0 +1,3 @@
|
||||
<p>This is a project post</p>
|
||||
<p>Typically, all these project posts will have a number of paragraphs.</p>
|
||||
<p>Even images: <img src="assets/images/baby-duck.jpg"></img></p>
|
||||
Loading…
Reference in New Issue
Block a user