diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 479ae34..9cbaaaf 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -20,15 +20,17 @@ import { ArticleService } from './services/article.service'; import { QuillModule } from 'ngx-quill'; import { CreateArticleComponent } from './secure/create-article/create-article.component'; import { EditArticleComponent } from './secure/edit-article/edit-article.component'; +import { ProfileComponent } from './public/profile/profile.component'; const router: Routes = [ { path: 'sign-in' , component: SignInComponent}, { path: 'sign-up' , component: SignUpComponent}, - { path: 'createarticle', component: CreateArticleComponent}, + { path: 'create-article', component: CreateArticleComponent}, { path: 'home' , component: HomeComponent}, - { path: 'article' , component: ArticleComponent}, { path: 'article/:id' , component: ArticleComponent}, - { path: '' , redirectTo: '/home' , pathMatch: 'full'} + { path: 'profile', component: ProfileComponent}, + { path: '' , redirectTo: '/home' , pathMatch: 'full'}, + { path: '**', redirectTo: '/home'} ]; @NgModule({ @@ -42,6 +44,7 @@ const router: Routes = [ ArticleComponent, CreateArticleComponent, EditArticleComponent, + ProfileComponent, ], imports: [ BrowserModule, diff --git a/src/app/public/profile/profile.component.html b/src/app/public/profile/profile.component.html new file mode 100644 index 0000000..cd8b801 --- /dev/null +++ b/src/app/public/profile/profile.component.html @@ -0,0 +1,3 @@ +

+ profile works! +

diff --git a/src/app/public/profile/profile.component.scss b/src/app/public/profile/profile.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/public/profile/profile.component.spec.ts b/src/app/public/profile/profile.component.spec.ts new file mode 100644 index 0000000..692b234 --- /dev/null +++ b/src/app/public/profile/profile.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ProfileComponent } from './profile.component'; + +describe('ProfileComponent', () => { + let component: ProfileComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ProfileComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ProfileComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/public/profile/profile.component.ts b/src/app/public/profile/profile.component.ts new file mode 100644 index 0000000..a9b65fc --- /dev/null +++ b/src/app/public/profile/profile.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-profile', + templateUrl: './profile.component.html', + styleUrls: ['./profile.component.scss'] +}) +export class ProfileComponent implements OnInit { + + constructor() { } + + ngOnInit() { + } + +} diff --git a/src/app/shared/top-nav/top-nav.component.html b/src/app/shared/top-nav/top-nav.component.html index e2d2016..35a55fb 100644 --- a/src/app/shared/top-nav/top-nav.component.html +++ b/src/app/shared/top-nav/top-nav.component.html @@ -17,7 +17,10 @@