From 07cd01e51942945e8c7e57004b0b226f72f81618 Mon Sep 17 00:00:00 2001 From: tim_curchod Date: Wed, 1 Sep 2021 04:46:31 +1000 Subject: [PATCH] #6 added pitures container component --- docs/trendy-client-layout.md | 6 +++-- .../pictures/pictures.component.html | 1 + .../pictures/pictures.component.scss | 0 .../pictures/pictures.component.spec.ts | 25 +++++++++++++++++++ .../containers/pictures/pictures.component.ts | 10 ++++++++ libs/pictures/src/lib/pictures.module.ts | 7 +++++- 6 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 libs/pictures/src/lib/containers/pictures/pictures.component.html create mode 100644 libs/pictures/src/lib/containers/pictures/pictures.component.scss create mode 100644 libs/pictures/src/lib/containers/pictures/pictures.component.spec.ts create mode 100644 libs/pictures/src/lib/containers/pictures/pictures.component.ts diff --git a/docs/trendy-client-layout.md b/docs/trendy-client-layout.md index 74bb892..d1ac3d6 100644 --- a/docs/trendy-client-layout.md +++ b/docs/trendy-client-layout.md @@ -1,7 +1,9 @@ # Trendy Client Layout -nx generate @nrwl/angular:lib pictures --routing --parent-module=apps/trendy/src/app/app.module.ts - nx generate @nrwl/angular:lib trendy-layout nx generate @nrwl/angular:component containers/trendy-layout --project=trendy-layout + +nx generate @nrwl/angular:lib pictures --routing --parent-module=apps/trendy/src/app/app.module.ts + +nx g @nrwl/angular:component containers/pictures --project=pictures diff --git a/libs/pictures/src/lib/containers/pictures/pictures.component.html b/libs/pictures/src/lib/containers/pictures/pictures.component.html new file mode 100644 index 0000000..90d6bec --- /dev/null +++ b/libs/pictures/src/lib/containers/pictures/pictures.component.html @@ -0,0 +1 @@ +

pictures works!

diff --git a/libs/pictures/src/lib/containers/pictures/pictures.component.scss b/libs/pictures/src/lib/containers/pictures/pictures.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/libs/pictures/src/lib/containers/pictures/pictures.component.spec.ts b/libs/pictures/src/lib/containers/pictures/pictures.component.spec.ts new file mode 100644 index 0000000..4e6db11 --- /dev/null +++ b/libs/pictures/src/lib/containers/pictures/pictures.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { PicturesComponent } from './pictures.component'; + +describe('PicturesComponent', () => { + let component: PicturesComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ PicturesComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(PicturesComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/libs/pictures/src/lib/containers/pictures/pictures.component.ts b/libs/pictures/src/lib/containers/pictures/pictures.component.ts new file mode 100644 index 0000000..38e7041 --- /dev/null +++ b/libs/pictures/src/lib/containers/pictures/pictures.component.ts @@ -0,0 +1,10 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'demo-app-pictures', + templateUrl: './pictures.component.html', + styleUrls: ['./pictures.component.scss'] +}) +export class PicturesComponent { + +} diff --git a/libs/pictures/src/lib/pictures.module.ts b/libs/pictures/src/lib/pictures.module.ts index 6ec36df..d25ce0b 100644 --- a/libs/pictures/src/lib/pictures.module.ts +++ b/libs/pictures/src/lib/pictures.module.ts @@ -1,10 +1,15 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { RouterModule, Route } from '@angular/router'; +import { PicturesComponent } from './containers/pictures/pictures.component'; export const picturesRoutes: Route[] = []; @NgModule({ - imports: [CommonModule, RouterModule], + imports: [ + CommonModule, + RouterModule.forChild([{ path: '', component: PicturesComponent }]), + ], + declarations: [PicturesComponent], }) export class PicturesModule {}