From 88d544f10a41588e2b47e4ac576e8cda68da565d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Romaszkin?= Date: Sat, 13 Jun 2020 14:47:49 +0200 Subject: [PATCH] Add template for discussion picker --- .../discussion-chooser.component.html | 1 + .../discussion-chooser.component.scss | 0 .../discussion-chooser.component.ts | 15 +++++++++++++++ .../src/app/main-view/main-view-routing.module.ts | 12 ++++++++++++ .../src/app/main-view/main-view.component.html | 3 +++ frontend/src/app/main-view/main-view.module.ts | 3 ++- 6 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 frontend/src/app/main-view/discussion-chooser/discussion-chooser.component.html create mode 100644 frontend/src/app/main-view/discussion-chooser/discussion-chooser.component.scss create mode 100644 frontend/src/app/main-view/discussion-chooser/discussion-chooser.component.ts diff --git a/frontend/src/app/main-view/discussion-chooser/discussion-chooser.component.html b/frontend/src/app/main-view/discussion-chooser/discussion-chooser.component.html new file mode 100644 index 0000000..9942342 --- /dev/null +++ b/frontend/src/app/main-view/discussion-chooser/discussion-chooser.component.html @@ -0,0 +1 @@ +

discussion-chooser works!

diff --git a/frontend/src/app/main-view/discussion-chooser/discussion-chooser.component.scss b/frontend/src/app/main-view/discussion-chooser/discussion-chooser.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/frontend/src/app/main-view/discussion-chooser/discussion-chooser.component.ts b/frontend/src/app/main-view/discussion-chooser/discussion-chooser.component.ts new file mode 100644 index 0000000..c855251 --- /dev/null +++ b/frontend/src/app/main-view/discussion-chooser/discussion-chooser.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-discussion-chooser', + templateUrl: './discussion-chooser.component.html', + styleUrls: ['./discussion-chooser.component.scss'] +}) +export class DiscussionChooserComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/frontend/src/app/main-view/main-view-routing.module.ts b/frontend/src/app/main-view/main-view-routing.module.ts index c275a09..977f11e 100644 --- a/frontend/src/app/main-view/main-view-routing.module.ts +++ b/frontend/src/app/main-view/main-view-routing.module.ts @@ -1,11 +1,23 @@ import { NgModule } from '@angular/core'; import { Routes, RouterModule, Router } from '@angular/router'; import { MainViewComponent } from './main-view.component'; +import { DiscussionChooserComponent } from './discussion-chooser/discussion-chooser.component'; const routes: Routes = [ { path: '', component: MainViewComponent, + children: [ + { + path: 'discussions', + component: DiscussionChooserComponent, + }, + { + path: '', + redirectTo: 'discussions', + pathMatch: 'full', + }, + ], }, ]; diff --git a/frontend/src/app/main-view/main-view.component.html b/frontend/src/app/main-view/main-view.component.html index d05929e..aa6f6c7 100644 --- a/frontend/src/app/main-view/main-view.component.html +++ b/frontend/src/app/main-view/main-view.component.html @@ -14,4 +14,7 @@ + + + diff --git a/frontend/src/app/main-view/main-view.module.ts b/frontend/src/app/main-view/main-view.module.ts index e7b40ee..a057c64 100644 --- a/frontend/src/app/main-view/main-view.module.ts +++ b/frontend/src/app/main-view/main-view.module.ts @@ -2,6 +2,7 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { MainViewComponent } from './main-view.component'; +import { DiscussionChooserComponent } from './discussion-chooser/discussion-chooser.component'; import { MainViewRoutingModule } from './main-view-routing.module'; import { @@ -12,7 +13,7 @@ import { } from '@nebular/theme'; @NgModule({ - declarations: [MainViewComponent], + declarations: [MainViewComponent, DiscussionChooserComponent], imports: [ CommonModule, MainViewRoutingModule,