Within Angular 5, there is a shared button component that is utilized by two distinct pages - page1 and page2. Strangely enough, the click event associated with this button component only seems to be accessible on page1. I am uncertain as to what may be causing this issue. Here is the comprehensive structure of the component hierarchy:
Index.html
App.html
page1.html
btn.html
page2.html
btn.html
It is worth noting that the btn.html component is shared between page1 and page2. The real problem lies in the fact that when the button is clicked, the associated event in btn.component.ts only triggers for page1.html, leaving page2.html clueless about this particular event.
To illustrate my dilemma, I have provided a Plunker code snippet showcasing the issue.
https://plnkr.co/edit/Ry5Uj2VHzVK0RfaJcXyZ?p=info
I would greatly appreciate any assistance or guidance on how to rectify this predicament. Your support is much appreciated. Thank you.