开发者

Deep-linking with Sammy.js?

开发者 https://www.devze.com 2023-03-22 13:28 出处:网络
I recently built a website using the sammy.js framework. The site includes a portfolio page with a grid of thumbnails that link to the detail page for each portfolio piece. All of this works.

I recently built a website using the sammy.js framework. The site includes a portfolio page with a grid of thumbnails that link to the detail page for each portfolio piece. All of this works.

What I c开发者_运维知识库annot seem to figure out how to do is be able to provide someone a link to a specific project on the site (ex: www.thesite.com/#/work-detail/some-project) and have it run the work-detail route with "some-project" as the variable that gets passed for it to load the correct content.

Any help would be appreciated.


So, this doesn't work?

get('#/work-detail/:project', function() {
        alert(this.params['project']);
});
0

精彩评论

暂无评论...
验证码 换一张
取 消