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 { HomeComponent } from './components/home/home.component';
|
||||||
import { ProjectsComponent } from './components/projects/projects.component';
|
import { ProjectsComponent } from './components/projects/projects.component';
|
||||||
import { ProjectComponent } from './components/project/project.component';
|
import { ProjectComponent } from './components/project/project.component';
|
||||||
|
import { PostsComponent } from './components/posts/posts.component';
|
||||||
|
import { PostComponent } from './components/post/post.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
AppComponent,
|
AppComponent,
|
||||||
HomeComponent,
|
HomeComponent,
|
||||||
ProjectsComponent,
|
ProjectsComponent,
|
||||||
ProjectComponent
|
ProjectComponent,
|
||||||
|
PostsComponent,
|
||||||
|
PostComponent
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
BrowserModule,
|
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 { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
import { ProjectComponent } from './project.component';
|
import { PostComponent } from './post.component';
|
||||||
|
|
||||||
describe('ProjectComponent', () => {
|
describe('PostComponent', () => {
|
||||||
let component: ProjectComponent;
|
let component: PostComponent;
|
||||||
let fixture: ComponentFixture<ProjectComponent>;
|
let fixture: ComponentFixture<PostComponent>;
|
||||||
|
|
||||||
beforeEach(async(() => {
|
beforeEach(async(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [ ProjectComponent ]
|
declarations: [ PostComponent ]
|
||||||
})
|
})
|
||||||
.compileComponents();
|
.compileComponents();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = TestBed.createComponent(ProjectComponent);
|
fixture = TestBed.createComponent(PostComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
fixture.detectChanges();
|
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 { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
import { ProjectsComponent } from './projects.component';
|
import { PostsComponent } from './posts.component';
|
||||||
|
|
||||||
describe('ProjectsComponent', () => {
|
describe('PostsComponent', () => {
|
||||||
let component: ProjectsComponent;
|
let component: PostsComponent;
|
||||||
let fixture: ComponentFixture<ProjectsComponent>;
|
let fixture: ComponentFixture<PostsComponent>;
|
||||||
|
|
||||||
beforeEach(async(() => {
|
beforeEach(async(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [ ProjectsComponent ]
|
declarations: [ PostsComponent ]
|
||||||
})
|
})
|
||||||
.compileComponents();
|
.compileComponents();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = TestBed.createComponent(ProjectsComponent);
|
fixture = TestBed.createComponent(PostsComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
fixture.detectChanges();
|
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",
|
"projects": [
|
||||||
"id":1
|
"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