title: onclick tag button doesn't work in angular
body: <p>I try to understand why this code doesn't work in angular</p>
  
  <p><strong>HTML</strong>: </p>
  
  <pre><code>&lt;button onclick="myFunction('hello')"&gt;Click me&lt;/button&gt;
  </code></pre>
  
  <p><strong>TYPESCRIPT</strong></p>
  
  <pre><code>@Component({
    selector: 'app-create',
    templateUrl: './create.component.html',
    styleUrls: ['./create.component.css']
  })
  
  export class CreateComponent {
  
    constructor() {}
  
  }
  
  
  function myFunction(hello: string) {
    console.log(hello);
  }
  </code></pre>
  
  <p>The error in <strong>console</strong> when I click</p>
  
  <pre><code>Uncaught ReferenceError: myFunction is not defined
      at HTMLButtonElement.onclick (create:1)
  onclick @ create:1
  </code></pre>
  
  <p>I know, (click) works perfect, but i need understand why cant use pure javascript in angular project</p>
  
  <p><strong>PLEASE don't put me -1 I Am learning,  Am not perfect</strong> =(</p>