title: NgModules : Using method of one component in another
body: <p>I have two modules, one a root module and another shared. Here is the shared module:</p>
  
  <pre><code>import { NgModule } from '@angular/core';
  import { SomeComponent } from "./somecomponent";
  @NgModule({
      declarations: [SomeComponent],
      exports: [SomeComponent]
  })
  export class SomeModule {}
  </code></pre>
  
  <p>I import <code>SomeModule</code> in my Root module like so:</p>
  
  <pre><code>import { NgModule }       from '@angular/core';
  import { BrowserModule  } from '@angular/platform-browser';
  import { AppComponent }   from './app.component';
  import { SomeModule } from somemodule/somemodule';
  
  @NgModule({
      declarations: [AppComponent],
      imports:      [BrowserModule, SomeModule],
      bootstrap:    [AppComponent], 
  })
  export class AppModule {}
  </code></pre>
  
  <p>It works fine until that point. Now, i want to use a method that is part of <code>SomeComponent</code> inside my <code>app.component</code>. But the problem is that the shared module does not directly expose <code>SomeComponent</code>.</p>
  
  <p>How will i call any methods from <code>SomeComponent</code> in <code>AppComponent</code> class? What will change if the method is <code>static</code>?</p>
  
  <p><strong>EDIT</strong> : Maybe i was not clear before. But <code>SomeComponent</code> is a directive which i have no problem using in the template of <code>AppComponent</code> but it also has a static method that i need to call in the class of <code>AppComponent</code> and since i am importing it in Root module, it should be availble inside the AppComponent. I want something like this in AppComponent</p>
  
  <pre><code>import {Component} from '@angular/core';
  @Component({
      selector: 'my-app',
      template: `&lt;some-component (someEvent)="handle($event)"&gt;&lt;/some-component&gt;`
  })
  export class AppComponent {
  
    _constructor(){}
  
    handle(event){
  
     SomeComponent.someStaticMethod();
  
    }
  }
  </code></pre>