首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >不能使用TRANSLOCO与故事簿在角钢

不能使用TRANSLOCO与故事簿在角钢
EN

Stack Overflow用户
提问于 2022-04-25 09:47:11
回答 1查看 186关注 0票数 0

我正在开发一个Range13lib,我想实现故事书,所有lib的组件都包括TRANSLOCO。所以,当我创作故事时,我看不到那些,因为我有这样的问题:

NG0302:在'InputTextComponent‘组件中找不到管道'transloco’!在https://angular.io/errors/NG0302错误中找到更多: NG0302:管道'transloco‘无法在'InputTextComponent’组件中找到!在https://angular.io/errors/NG0302 at getPipeDef (http://localhost:6006/vendors-node_modules_ngneat_transloco_fesm2015_ngneat-transloco_js-node_modules_storybook_add-e00a9f.iframe.bundle.js:152096:11) atɵɵpipe (http://localhost:6006/vendors-node_modules_ngneat_transloco_fesm2015_ngneat-transloco_js-node_modules_storybook_add-e00a9f.iframe.bundle.js:152043:15) at InputTextComponent_Template (ng://InputTextComponent.js:72:9),executeTemplate (http://localhost:6006/vendors-node_modules_ngneat_transloco_fesm2015_ngneat-transloco_js-node_modules_storybook_add-e00a9f.iframe.bundle.js:137642:5) at renderView (http://localhost:6006/vendors-node_modules_ngneat_transloco_fesm2015_ngneat-transloco_js-node_modules_storybook_add-e00a9f.iframe.bundle.js:137371:7) at renderComponent$1 (http://localhost:6006/vendors-node_modules_ngneat_transloco_fesm2015_ngneat-transloco_js-node_modules_storybook_add-e00a9f.iframe.bundle.js:138906:3) at renderChildComponents (http://localhost:6006/vendors-node_modules_ngneat_transloco_fesm2015_ngneat-transloco_js-node_modules_storybook_add-e00a9f.iframe.bundle.js:137206:5) at renderView (http://localhost:6006/vendors-node_modules_ngneat_transloco_fesm2015_ngneat-transloco_js-node_modules_storybook_add-e00a9f.iframe.bundle.js:137405:7) at renderComponent$1 (http://localhost:6006/vendors-node_modules_ngneat_transloco_fesm2015_ngneat-transloco_js-node_modules_storybook_add-e00a9f.iframe.bundle.js:138906:3) at renderChildComponents (http://localhost:6006/vendors-node_modules_ngneat_transloco_fesm2015_ngneat-transloco_js-node_modules_storybook_add-e00a9f.iframe.bundle.js:137206:5)

感谢每个人都会帮上忙

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-04-26 12:32:34

我解决了在moduleMetadata中导入moduleMetadata的问题。所以故事的结果是:

代码语言:javascript
复制
export default { 
  title: 'storytitle', 
  component: 'storycomponent',
  decorators: [ 
    moduleMetadata:({ 
     imports: [ TranslocoModule ] 
    }) 
  ],
} as Meta
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71997555

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档