component1.html
<input type="text" value="some text">
<button>next</button>
anotherComponent.html
<input type="text">//value of component1 should be shown here when the button is clicked.
There are two independent components here.
My question is how to pass value of component1 to anotherComponent when the button is clicked.
child&parentcomponents ? or they both are independent ? Be more specific and let us know what have you tried till now. You can get it on google pretty easily