Listen for custom events for the bus in component b. However, after dispatching events in component a, it accesses component b. the listening function of component b is executed
Your code will not work as expected as your are changing route after emitting event from Component A. So it can't be catch by Component B.
You can save the changed value in mixing look here for mixins or use localstorage. And you can also use query string as stated in previous answer