Skip to content

Commit

Permalink
The guest layout is managed
Browse files Browse the repository at this point in the history
  • Loading branch information
little-pinecone committed Aug 30, 2018
1 parent 9d92b44 commit a5cb113
Show file tree
Hide file tree
Showing 20 changed files with 221 additions and 22 deletions.
13 changes: 13 additions & 0 deletions src/app/app-routing.module.spec.ts
@@ -0,0 +1,13 @@
import { AppRoutingModule } from './app-routing.module';

describe('AppRoutingModule', () => {
let appRoutingModule: AppRoutingModule;

beforeEach(() => {
appRoutingModule = new AppRoutingModule();
});

it('should create an instance', () => {
expect(appRoutingModule).toBeTruthy();
});
});
21 changes: 21 additions & 0 deletions src/app/app-routing.module.ts
@@ -0,0 +1,21 @@
import { NgModule } from '@angular/core';
import { RouterModule, Routes} from '@angular/router';

import { GuestLayoutComponent } from './layout/guest/guest-layout/guest-layout.component';
import { LandingPageComponent } from './pages/landing-page/landing-page.component';

const routes: Routes = [
{
path: '',
component: GuestLayoutComponent,
children: [
{ path: '', component: LandingPageComponent, pathMatch: 'full'},
]
},
];

@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [ RouterModule ]
})
export class AppRoutingModule { }
21 changes: 1 addition & 20 deletions src/app/app.component.html
@@ -1,20 +1 @@
<!--The content below is only a placeholder and can be replaced.-->
<div style="text-align:center">
<h1>
Welcome to {{ title }}!
</h1>
<img width="300" alt="Angular Logo" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg==">
</div>
<h2>Here are some links to help you start: </h2>
<ul>
<li>
<h2><a target="_blank" rel="noopener" href="https://angular.io/tutorial">Tour of Heroes</a></h2>
</li>
<li>
<h2><a target="_blank" rel="noopener" href="https://github.com/angular/angular-cli/wiki">CLI Documentation</a></h2>
</li>
<li>
<h2><a target="_blank" rel="noopener" href="https://blog.angular.io/">Angular blog</a></h2>
</li>
</ul>

<router-outlet></router-outlet>
14 changes: 12 additions & 2 deletions src/app/app.module.ts
Expand Up @@ -3,14 +3,24 @@ import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';
import { PageContentComponent } from './layout/page-content/page-content.component';
import { GuestTopNavComponent } from './layout/guest/guest-top-nav/guest-top-nav.component';
import { GuestFooterComponent } from './layout/guest/guest-footer/guest-footer.component';
import { GuestLayoutComponent } from './layout/guest/guest-layout/guest-layout.component';
import { LandingPageComponent } from './pages/landing-page/landing-page.component';
import { AppRoutingModule } from './/app-routing.module';

@NgModule({
declarations: [
AppComponent,
PageContentComponent
PageContentComponent,
GuestTopNavComponent,
GuestFooterComponent,
GuestLayoutComponent,
LandingPageComponent
],
imports: [
BrowserModule
BrowserModule,
AppRoutingModule
],
providers: [],
bootstrap: [AppComponent]
Expand Down
3 changes: 3 additions & 0 deletions src/app/layout/guest/guest-footer/guest-footer.component.html
@@ -0,0 +1,3 @@
<p>
guest-footer works!
</p>
Empty file.
25 changes: 25 additions & 0 deletions src/app/layout/guest/guest-footer/guest-footer.component.spec.ts
@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { GuestFooterComponent } from './guest-footer.component';

describe('GuestFooterComponent', () => {
let component: GuestFooterComponent;
let fixture: ComponentFixture<GuestFooterComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ GuestFooterComponent ]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(GuestFooterComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
15 changes: 15 additions & 0 deletions src/app/layout/guest/guest-footer/guest-footer.component.ts
@@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'app-guest-footer',
templateUrl: './guest-footer.component.html',
styleUrls: ['./guest-footer.component.scss']
})
export class GuestFooterComponent implements OnInit {

constructor() { }

ngOnInit() {
}

}
5 changes: 5 additions & 0 deletions src/app/layout/guest/guest-layout/guest-layout.component.html
@@ -0,0 +1,5 @@
<div>
<app-guest-top-nav></app-guest-top-nav>
<app-page-content></app-page-content>
<app-guest-footer></app-guest-footer>
</div>
Empty file.
25 changes: 25 additions & 0 deletions src/app/layout/guest/guest-layout/guest-layout.component.spec.ts
@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { GuestLayoutComponent } from './guest-layout.component';

describe('GuestLayoutComponent', () => {
let component: GuestLayoutComponent;
let fixture: ComponentFixture<GuestLayoutComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ GuestLayoutComponent ]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(GuestLayoutComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
15 changes: 15 additions & 0 deletions src/app/layout/guest/guest-layout/guest-layout.component.ts
@@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'app-guest-layout',
templateUrl: './guest-layout.component.html',
styleUrls: ['./guest-layout.component.scss']
})
export class GuestLayoutComponent implements OnInit {

constructor() { }

ngOnInit() {
}

}
@@ -0,0 +1,3 @@
<p>
guest-top-nav works!
</p>
Empty file.
25 changes: 25 additions & 0 deletions src/app/layout/guest/guest-top-nav/guest-top-nav.component.spec.ts
@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { GuestTopNavComponent } from './guest-top-nav.component';

describe('GuestTopNavComponent', () => {
let component: GuestTopNavComponent;
let fixture: ComponentFixture<GuestTopNavComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ GuestTopNavComponent ]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(GuestTopNavComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
15 changes: 15 additions & 0 deletions src/app/layout/guest/guest-top-nav/guest-top-nav.component.ts
@@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'app-guest-top-nav',
templateUrl: './guest-top-nav.component.html',
styleUrls: ['./guest-top-nav.component.scss']
})
export class GuestTopNavComponent implements OnInit {

constructor() { }

ngOnInit() {
}

}
3 changes: 3 additions & 0 deletions src/app/pages/landing-page/landing-page.component.html
@@ -0,0 +1,3 @@
<p>
landing-page works!
</p>
Empty file.
25 changes: 25 additions & 0 deletions src/app/pages/landing-page/landing-page.component.spec.ts
@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { LandingPageComponent } from './landing-page.component';

describe('LandingPageComponent', () => {
let component: LandingPageComponent;
let fixture: ComponentFixture<LandingPageComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ LandingPageComponent ]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(LandingPageComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
15 changes: 15 additions & 0 deletions src/app/pages/landing-page/landing-page.component.ts
@@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'app-landing-page',
templateUrl: './landing-page.component.html',
styleUrls: ['./landing-page.component.scss']
})
export class LandingPageComponent implements OnInit {

constructor() { }

ngOnInit() {
}

}

0 comments on commit a5cb113

Please sign in to comment.