PagerJS how to build a navbar?
问题 My goal is to write some reusable code to render basic navbars, since it would be a very repetitive task. The following features are my first goal: Each page should be rendered in a foreach binding Each page should grab the active state reading current route Each page should be loaded either async or inline Here's my first attempt. I want markup to be something like this <ul data-bind='foreach: pages'> <li> <!-- [1] Here a toggler is needed for active/no-active status, i.e. a class binding. -