title: add event to the radio button created using createElement in angular
body: <p>I had created the dynamic radio button to be added to the html in angular ,just wanted to how can i add a click event to it along with the function name that should be  invoked when click occurs and pass parameter to that function as well,below is the code that i'm trying out</p>
  <pre><code>for (let c in consult.value.rabies) {
             for(let i in consult.value.rabies[c].choices){
              const radio:HTMLInputElement = this.renderer.createElement(&quot;INPUT&quot;);
              radio.setAttribute(&quot;type&quot;, &quot;radio&quot;);
              radio.addEventListener(&quot;click&quot;)
      
              const lbl = this.renderer.createElement(&quot;label&quot;);
              lbl.innerHTML = consult.value.dance[c].types[i].text;
      
              this.renderer.appendChild(this.div.nativeElement, radio)
              this.renderer.appendChild(this.div.nativeElement,lbl)
  
         }
      }
  </code></pre>
  <p>event listener i want to create as followed <code>radio.addEventListener(&quot;click&quot;,&quot;rabiesBuild(array)&quot;)</code></p>