在app.module.ts中聲明的App Ionic 2指令中。Ionic 3中的指令
但是在Ionic 3(延遲加載)中,此指令不起作用。 我嘗試組件模塊中輸入指令,例如:
...
import { TabindexDirective } from '../../../app/tabindex.directive';
@NgModule({
declarations: [
...
TabindexDirective,
],
imports: [
...
],
exports: [
...
],
})
export class SignupModule {}
此代碼工作正常,但後來我輸入這個指令在另一個組件模塊,我有錯誤:
Type GoComponent is part of the declarations of 2 modules: SignupModule and AddPageModule! Please consider moving GoComponent to a higher module that imports
如何修復並在Ionic 3中使用指令?
[離子3周的iOS可能重複建設--prod不工作:聲明的2模塊錯誤](https://stackoverflow.com/questions/46840108/ionic-3-ios-build-prod-not-working-declarations-of-2-modules-error) –