小编Am *_*ice的帖子

Angular 5 - 路由到具有不同 URL 的相同组件

我有以下路由应该路由到同一个组件,我可以通过使用以下结构来让它工作。

const carModuleRoutes: Routes = [
    { path: 'car/:category/:carId', component: CarDetailComponent},
    { path: 'car/:carId', component: CarDetailComponent},
];
Run Code Online (Sandbox Code Playgroud)

但我知道这不是这样做的标准方法,是否有执行相同功能的正确方法?

angular-ui-router angular2-routing angular

6
推荐指数
1
解决办法
1万
查看次数

Angular 2 中支持 Youtube 和 Vimeo 视频的视频播放器插件

到目前为止,我一直在使用https://videogular.github.io/videogular2/docs/在我的应用程序中播放我的自定义视频,但最近当我尝试播放源为 youtube 和 vimeo 的视频时,此插件不支持它。

是否有更好的开源替代方案可用于播放来自 Angular 2+ 中各种插件的视频。

html video-streaming html5-video angular

3
推荐指数
1
解决办法
5187
查看次数

IText 7 表格中的列宽问题

我使用固定列宽创建了下表,如下所示,

 Table headerTable = new Table(new float[]{5,5,5});
 headerTable.setWidthPercent(100);

 headerTable.addCell(new Cell().add(new Paragraph("Student Name : Michel John(xxxx-xxx-xxx-xxx)")).setFontSize(10).setTextAlignment(TextAlignment.LEFT));
 headerTable.addCell(new Cell().add(new Paragraph("Admission Date : 2012-05-01")).setFontSize(10).setTextAlignment(TextAlignment.CENTER));
 headerTable.addCell(new Cell().add(new Paragraph("Current Standard : Eigth Standard - 'B' Section")).setFontSize(10).setTextAlignment(TextAlignment.RIGHT));
Run Code Online (Sandbox Code Playgroud)

但是当我在我的 PDF 文件中看到输出格式时,列宽是不均匀的。 在此处输入图片说明

我在那个代码片段中遗漏了什么吗?

itext itext7

2
推荐指数
2
解决办法
3805
查看次数