there are many way you can do this. I suggest you to define a get function inside the controller of your app-sidebar component, like 'getSelectedItem' that return the value of the selected item. So now you can recover the selected value at any time thanks to the binding, and you can pass the value to the other component.
Therefore, in your app-sidebar component you can define the binding
binding: {
getSelectedValue: '='
}
In the controller you can now define the get-function
thsi.getSelectedValue = {
// do your stuff here
return selectedValue
}
Now the crucial passage:
In the main controller (I mean the controller of the html page in which you use both component) you shoul declare a function, just to tell angular that this function exist, but it is not define here (infact we want to call the function that is declared in the component to recover the selected value). So in your controller you have just to write
this.getValue;
Now in the html page you can use your modified component in this way:
<app-sidebar get-selected-value='mainController.getValue'></app-sidebar>
(Remember the kebab notation: getSelectedItem to get-selectd-item)
This is kind of a revers binding. Infact you normally define a function in your main controller and then you pass it to your component. In this case the function is define in your component, but thanks to the binding now you can call the function getSelectedItem in your main controller calling this.getValue();
Infact the function this.getValue() is not defined in the controller, it is just declared, but it is in binding with the function getSelectedValue.
At this point you have your value and you can pass it to the other component.
Maybe this method is a bit longer than other, but I suggest to use this because in many occasion it is very useful to use this 'reverse' binding.