英文:
Translate pipe is not working in child module
问题
我正在使用Angular 8开发一个示例应用程序。除了使用ngx-translate进行翻译。我已经在app.module.ts中导入了所有必需的代码来实现翻译服务,并且它完美运行。但是,当我添加一个新的模块进行延迟加载并尝试在这个新创建的模块中访问翻译管道时,它给我报错:
找不到管道 'translate'
有人可以帮忙吗?
英文:
I am developing a sample app using Angular 8. Along with ngx-translate for translation.
I have imported all the required code in app.module.ts for translate service and it worked perfectly fine. As soon as i added a new module for lazy loading and trying to access the translate pipe in this newly created module, it is giving me error
>The pipe 'translate' could not be found
Can anyone please help?
答案1
得分: 0
Importing TranslateModule in child module's module.ts worked.
Thanks guys.
英文:
Importing TranslateModule in child module's module.ts worked.
Thanks guys.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论