angular2,模块,angular,共享模块,angular,模块组件共享
web前端-js教程创建模块,用到了共享模块PostSharedModule,共享模块里面包含了2个公用的模块:文章管理模块和评论管理模块
会员计次管理系统源码免费,vscode查看所有断点,qt ubuntu 配置,杀死进程重启tomcat,applet 爬虫,php 文件缓存类,五华优化seo,下载小说小说网站源码,网上论坛网站模板lzw
1,创建一个模块testmodule.module.ts移动京东源码下载,ubuntu很卡查询原因,tomcat数据库连接文件,爬虫爬网络,零基础学php视频,神马seo报价lzw
import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; import { RouterModule } from "@angular/router"; import { PostSharedModule } from '../shared/post.module'; import { testModule } from './testmodule.routes'; import { TestMainComponent } from './test-main/test-main.component'; import { PostTableService } from '../manage/post-table/services/post-table.service'; @NgModule({ declarations: [ TestMainComponent ], imports: [ CommonModule, PostSharedModule, RouterModule.forChild(testModule) ], exports:[ TestMainComponent ], providers: [ PostTableService ] }) export class TestModule { }
2.创建模块路由testmodule.routes.ts
kppw源码结构,ubuntu安装心得感受,爬虫分类和原理,php试卷题库,seo推广哪家lzw
import { TestMainComponent } from './test-main/test-main.component'; import { PostTableComponent } from '../manage/post-table/post-table.component'; import { CommentTableComponent } from '../manage/comment-table/comment-table.component'; export const testModule = [ { path:'', component:TestMainComponent, children: [ { path: '',redirectTo:'posttable/page/1',pathMatch:'full'}, { path: 'posttable/page/:page', component: PostTableComponent }, { path: 'commenttable/page/:page', component: CommentTableComponent }, { path: '**', redirectTo:'posttable/page/1' } ] } ];
3.执行ng g c test-main,创建组件test-main,修改test-main.component.html
10000文章管理 1000000评论管理
创建 共享模块post.module.ts
import { NgModule } from '@angular/core'; import { ModalModule } from 'ng2-bootstrap'; import { PaginationModule } from 'ng2-bootstrap'; import { SharedModule } from './shared.module'; import { CommentTableComponent } from '../manage/comment-table/comment-table.component'; import { PostTableComponent } from '../manage/post-table/post-table.component'; @NgModule({ imports:[ SharedModule, ModalModule.forRoot(), PaginationModule.forRoot() ], declarations:[ CommentTableComponent, PostTableComponent ], exports:[ ModalModule, PaginationModule, CommentTableComponent, PostTableComponent ] }) export class PostSharedModule { }