I had a similar problem: firstly, router.visibleRoutes() is an observable array. In other words, when you change your value, routes are automatically updated. However, elements in this array are not observed, so to make changes you need to replace the entire array, and not just make changes to one element in it.
So, all you have to do is find which element in this array you want to delete, then create a new array without this element and set router.visibleRoutes() to this new array.
If, for example, you find out that this is the third element, then one way to do this is:
router.visibleRoutes(router.visibleRoutes().splice(2, 1))
Note that splice() returns a new array in which the element is deleted. This new array is placed in router.visibleRoutes .
source share