Use Directive and Service from Module Globally


#1

We have a Module which is something like that

@NgModule({
    declarations: [
        LaDraggableDirective,
        LaDroppableDirective
    ],
    providers: [
        LADragAndDropService
    ],
    exports: [
        LaDraggableDirective,
        LaDroppableDirective
    ]
})
export class LADragAndDropModule { }

So we import and export two directives and use a service as provider.

Normally I think if we import this module in our global app.module.ts like that

@NgModule({
    declarations: [
        MyApp
    ],
    imports: [
        BrowserModule,
        HttpModule,
        LADragAndDropModule,
        IonicModule.forRoot(MyApp, {
            preloadModules: true
        })
    ],
.....

The directives should be usable on every other component and other submodule.
But this is not so, we can not use the directive every where but we have to re import the module on every other page, but this should not be so.