问题描述:

  基于Ionic最新的super模板,创建的项目,在自己改造成懒加载机制后,原本正常的项目出现问题了,提示模板内部使用的翻译管道找不到,如图:

Template parse errors: The pipe 'translate' could not be found

模板内部使用的翻译管道代码,我确定没有问题,

问题的产生应该与改造懒加载模式有关系,但是不清楚为什么会产生冲突。

最终解决方案:

  在确保app.module中import TranslateModule的同时:

Template parse errors: The pipe 'translate' could not be found

 Template parse errors: The pipe 'translate' could not be found

务必要在submodule中import TranslateModule,否则就会出现文章开头的错误,具体如下:

Template parse errors: The pipe 'translate' could not be found

 

其他submodule也是一样的道理。

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-03
  • 2021-11-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-03-09
  • 2022-03-09
  • 2021-11-06
  • 2021-09-11
  • 2021-08-23
  • 2021-05-23
相关资源
相似解决方案