【发布时间】:2017-07-19 08:52:21
【问题描述】:
在 app.module.ts 中声明的 Ionic 2 指令的应用程序中。
但在 Ionic 3(延迟加载)中,该指令不起作用。 我尝试在组件模块中导入指令,例如:
...
import { TabindexDirective } from '../../../app/tabindex.directive';
@NgModule({
declarations: [
...
TabindexDirective,
],
imports: [
...
],
exports: [
...
],
})
export class SignupModule {}
这段代码工作正常,但是我在另一个组件模块中导入这个指令,我有错误:
类型 GoComponent 是 2 个模块声明的一部分: SignupModule 和 AddPageModule!请考虑将 GoComponent 移至 导入的更高模块
如何修复它并在 Ionic 3 中使用指令?
【问题讨论】:
标签: angular ionic-framework ionic2