Skip to content

Commit

Permalink
feat($about): Add an about page.
Browse files Browse the repository at this point in the history
Add an about page and set up the routing.
  • Loading branch information
Jason Hodges committed Nov 9, 2017
1 parent 779d2ed commit 6ede23b
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ import { RouterModule, Routes } from '@angular/router';
import { NgModule } from '@angular/core';
import { PostsComponent } from './ngx-blog/components/posts/posts.component';
import { BlogComponent } from './ngx-blog/components/blog/blog.component';
import { AboutComponent } from './ngx-blog/components/about/about.component';

const routes: Routes = [
{ path: '', redirectTo: '/home', pathMatch: 'full' },
{ path: 'about', component: AboutComponent },
{ path: 'home', component: HomeComponent },
{ path: 'posts', component: PostsComponent },
{ path: 'blog/:urlTitle', component: BlogComponent }
Expand Down
2 changes: 2 additions & 0 deletions src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
[routerLinkActiveOptions]="{exact: true}">Home</a>
<a routerLink="posts"
routerLinkActive="active">Posts</a>
<a routerLink="about"
routerLinkActive="active">About</a>
</nav>
</header>
<router-outlet
Expand Down
1 change: 1 addition & 0 deletions src/app/ngx-blog/components/about/about.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
About Component
9 changes: 9 additions & 0 deletions src/app/ngx-blog/components/about/about.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { Component } from '@angular/core';

@Component({
selector: 'ngxb-about',
templateUrl: './about.component.html'
})
export class AboutComponent {
constructor() { }
}
4 changes: 3 additions & 1 deletion src/app/ngx-blog/ngx-blog.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { CommonModule } from '@angular/common';
import { PostsComponent } from './components/posts/posts.component';
import { PostModule } from './components/post/post.module';
import { BlogComponent } from './components/blog/blog.component';
import { AboutComponent } from './components/about/about.component';

export const ROUTES: Routes = [
{ path: '', component: HomeComponent }
Expand All @@ -20,9 +21,10 @@ export const ROUTES: Routes = [
],
exports: [],
declarations: [
AboutComponent,
BlogComponent,
HomeComponent,
PostsComponent,
BlogComponent
],
providers: [
PostsService
Expand Down
Empty file added src/app/styles/_theme.scss
Empty file.

0 comments on commit 6ede23b

Please sign in to comment.