0

I have one component with

render() { 
  return (
    <Host>
      <my-component>
        <button onclick={}></button>
      </my-component>
    </Host>
  );
}

How can i invoke my-component1 from my-component based on button-click event and pass some parameter?

I have another component

render() { 
  return (
    <Host>
      <my-component1></my-component1>
    </Host>
  );
} 

Tried calling my-component1 in onClick function. did not work

Ryan Waskiewicz
  • 319
  • 4
  • 11
Techie
  • 1
  • Have you looked into `props`? – taylorswiftfan Aug 11 '23 at 01:47
  • 3
    Also `Render()` looks suspiciously like React, not Angular as tagged? – taylorswiftfan Aug 11 '23 at 01:48
  • 1
    Can you explain what you mean by "How can i invoke my-component1 from my-component based on button-click event and pass some parameter?"? Do you want to call a function in the class that defines `my-component1`? Or show `my-component1` when that click handler is invoked? Right now, there isn't a clear connection between the two components, which makes it hard to help :-) – Ryan Waskiewicz Aug 14 '23 at 13:34

0 Answers0