title: TypeError: ctx.onCreditChange is not a function angular
body: <p>I have two components. Component A which is the parent and component B which is the child.
  Component A looks like this:</p>
  <p>A.html</p>
  <pre><code>    &lt;nb-box [onCreditChange]=&quot;onCreditChange&quot;&gt;&lt;/nb-box&gt;
  </code></pre>
  <p>A.ts</p>
  <pre><code>onCreditChange($event) { console.log($event) }
  </code></pre>
  <p>The function from component A is transferred to B.</p>
  <p>Component B looks like this</p>
  <p>B.html</p>
  <pre><code>&lt;div class=&quot;box&quot;&gt;
   &lt;nb-switch  (onChange)=&quot;onCreditChange($event)&quot;&gt;&lt;/nb-switch&gt;
  
  &lt;/div&gt;
  </code></pre>
  <p>B.ts  (part of this component)</p>
  <pre><code>import { Component, Input, NgModule, EventEmitter, Output} from '@angular/core';
  
  export class Box extends BoxBase {
    @Output() onCreditChange: EventEmitter&lt;any&gt; = new EventEmitter()
  
  }
  </code></pre>
  <p>I get an error when calling the function</p>
  <pre><code>core.js:6241 ERROR TypeError: ctx.onChange is not a function
  </code></pre>
  <p>Do you know how to fix it?</p>