My Directive are not available on the @ionicPage page


#1

I have a problem,I have some interfaces that use @IonicPage lazy loading ,But these pages are not written by my own Directive ,Pages that are not used are normal,Excuse me, what’s the reason for that?Forgive me for my English。

我有一些页面使用了@ionicPage 懒加载,但是这些页面不能使用我自己写的指令,没有使用@ionicPage 的页面是正常的,请问这是什么原因?


#2

You are going to have to create a module for each directive that declares and exports it, and import that module in the module of every page that needs it.


#3

Thanks very much。I put the Directive I wrote into a module。Then import the modules on the page you need 。