【发布时间】:2019-10-01 06:43:49
【问题描述】:
我正在关注 Angular 的 Kendo Drawer 组件的官方示例。首先,我声明了变量
public items: Array<DrawerItem> = [];
接下来,在构造函数中我有以下几行
constructor(private router: Router) {
const routes: any[] = router.config;
routes.forEach(route => {
this.items.push({
text: route.text,
path: route.path ? route.path : ''
});
});
}
它说 'path' 在类型 DrawerItem 中不存在。为什么?所有剑道示例都引用此属性。 此外,路由器不包含“文本”属性。我无法使用 Drawer 组件映射路线。
谢谢。
【问题讨论】:
标签: angular kendo-ui-angular2 drawer