87,910
社区成员
发帖
与我相关
我的任务
分享
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { Routes, RouterModule} from "@angular/router";
import { IndexComponent } from "./index/index.component"
import { FormsModule} from "@angular/forms";
import { HttpClientModule } from '@angular/common/http';
import { DaohangComponent} from "./index/daohang/daohang.component";
import { LoginComponent} from "./index/login/login.component";
import { BrowserModule } from '@angular/platform-browser';
import { PubQueComponent } from './index/daohang/pub-que/pub-que.component';
import { QuillModule } from 'ngx-quill';
const routes: Routes = [
{ path: '', component: IndexComponent, children: [
{path: 'login', component: LoginComponent},
{path: 'daohang', component: DaohangComponent, children: [
{path: 'pubque', component: PubQueComponent},
]},
]},
];
@NgModule({
declarations: [
IndexComponent,
LoginComponent,
DaohangComponent,
PubQueComponent,
],
imports: [
RouterModule.forRoot(routes),
FormsModule,
HttpClientModule,
BrowserModule,
QuillModule,
],
// providers: [QuillModule,
// PubQueComponent,],
exports: [RouterModule]
})
export class AppRoutingModule { }
<form #pub="ngForm" (ngSubmit)="onPubSubmit(pub.value)">
<table class="table table-bordered">
<tr>
<td>发布问题</td>
</tr>
<tr>
<td><input name='title' type="text" class="form-control" placeholder="习题标题:请输入习题头一行" ngModel></td>
</tr>
<tr>
<td align="left">
内容:
<!--<textarea class="form-control" rows="9"></textarea>-->
<!--<quill-editor name="content" [modules]="pub_config" [style]="{height: '200px'}" [(ngModel)]="data.content" (onEditorCreated)="EditorCreated($event)" ngModel></quill-editor>-->
<!-- <textarea class="form-control" rows="9"></textarea> -->
<!--<quill-editor name='content' ngModel></quill-editor>-->
<quill-editor [(ngModel)]="editorContent"> </quill-editor>
</td>
</tr>
<tr>
<td>
<input type='submit' value='发布' class="btn btn-success">
</td>
</tr>
</table>
</form>