Add template for discussion picker
This commit is contained in:
parent
192c52f587
commit
88d544f10a
@ -0,0 +1 @@
|
||||
<p>discussion-chooser works!</p>
|
@ -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 {
|
||||
}
|
||||
|
||||
}
|
@ -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',
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
|
@ -14,4 +14,7 @@
|
||||
</div>
|
||||
</nb-layout-header>
|
||||
<nb-sidebar tag="main"></nb-sidebar>
|
||||
<nb-layout-column>
|
||||
<router-outlet></router-outlet>
|
||||
</nb-layout-column>
|
||||
</nb-layout>
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user