title: Create public method on angular component for outside of angular access
body: <p>If I query an angular element in, for example, the DevTools console</p>
  
  <pre><code>$&gt; $('app-foo').setSomething('yolo');
  </code></pre>
  
  <p>it doesn't work, telling me that <code>setSomething</code> does not exist.</p>
  
  <p>I tried to create an angular component like this</p>
  
  <pre><code>@Component({
       selector: 'app-my-component',
       template: 'my component'
  })
  export class MyComponent {
      @Input()
      setSomething(input: string): void {
          // do magic
      }
  }
  </code></pre>
  
  <p><a href="https://stackblitz.com/edit/angular-bha3p6?file=src%2Fapp%2Fapp.component.ts" rel="nofollow noreferrer">DEMO</a></p>
  
  <p>However, if I compile my component to a web component (using <code>@angular/elements</code>) it actually works. But in my current case I'm not going to create a web component and I have to deal with angular components. So the question is, how can I make a method available on the DOM instance? If there is an other way of doing this please let me know as well!</p>
  
  <p>UPDATE: The reason I would like to this this is because I created a web component with @angular/elements called <code>lib-foo</code>. This component should receive an other component as follows</p>
  
  <pre><code>&lt;lib-foo&gt;
       &lt;an-angular-component&gt;&lt;/an-angular-component&gt;
  &lt;/lib-foo&gt;
  </code></pre>
  
  <p>The template from <code>lib-foo</code> is just <code>&lt;slot&gt;&lt;/slot&gt;</code> (shadowdom enabled).</p>
  
  <p>From within <code>lib-foo</code> I would like to access <code>an-angular-component</code>, so I did</p>
  
  <pre><code>child = this.element.nativeElement.children[0]; // an-angular-component
  contentChild.setSomething('yolo');
  </code></pre>
  
  <p><code>lib-foo</code> should only get children which have a <code>setSomething</code> method. But whatever I do to create <code>an-angular-component</code> in my other angular project, these components never have that method</p>