I recently started using knockout.js and sammy.js to upgrade my application. However, I ran into some problems.
I have some valid links on the page - users should actually navigate to that location instead of simulating navigation behavior using sammy.js . I want only hash-related links to be redirected using sammy.js, but it also intercepts links that don't have hashes.
for example, it intercepts <a href="/logout">logout</a> .
js part that performs routing:
Sammy(function () { this.get('#/', function () { ... }); this.get('#:id', function () { ... }); this.get('', function () { this.app.runRoute('get', '#/') }); }).run();
I think that the part of this.get('' .. ) is the culprit that causes this behavior - I got it from the knockout.js tutorial, which says that the string is necessary so that users from another source correctly view my web page . page with code knockout.js /w/ . I want sammy.js to work only in /w/ or at least let users switch to /logout . How can i do this?
thkang
source share