I am trying to add a new view to John Papa's Code Camper project. I am stuck on the simple hash nav binding. My question is how do I find the code that populates {href: favorites} ? It gets populated with the hash tag #/favorites but I cannot find where that happens. There are over 30 JS files and searching for "favorites" yields too many results. I have tried adding my newview code everywhere I find "favorites" but with no luck. I get the error:
Message: ReferenceError: newview is not defined; Bindings value: attr: {href: newview}
So, how can I determine what populates {href: favorites} in the code below? I do know how knockout bindings work, I just can't locate the code in the project. John Papa's Code Camper project and this specific code aside, in general is there any tool that can tell where a binding is located in knockout js?
<li class="route-top"><a data-bind="attr: {href: favorites}">Favorites</a></li>
EDIT: for this case, I found the binding. I thought it did not work because a web page was stuck in cache. Still, if there is a tool or method to identify what code is bound to a property I would like to know about it.