“错误无法解析来自”的可扩展角度分量

问题描述 投票:0回答:1

我在Angular中创建了一个可扩展的父组件。

@Component({
  selector: '',
  templateUrl: '',
})
export class AbstractPagerComponent {...}

并获得编译错误:

“错误无法从/this-path-is-ok/abstract-pager/abstract-pager.component.ts中解析资源”我没有得到该错误的含义,因为路径正常并且组件已导入并添加到模块中。

angular angular-components
1个回答
0
投票

在墙上敲了几下我的脑袋,打了个电话给克苏鲁之后,我意识到这意味着他在组件中没有URL模式。

所以我通过将templateUrl更改为template

来解决它

@Component({
  selector: '',
  template: '',
})
export class AbstractPagerComponent{...}
© www.soinside.com 2019 - 2024. All rights reserved.