Comments (9)
@nicklao 路由规则怎么写的?
from spa.
@zhaoda 路由规则这样写的 route: "home/list:num"
from spa.
路由改成 home/list/:num ,链接改成 home/list/1 这样试试呢?你说的不能正常显示,报错了么?还是显示成什么?
from spa.
@zhaoda 试了,还是不行!情况是没有报错,只是没有显示出任何东西,每打开一次参数不同的路由,就会产生多一个 class="spa-page spa-page-home" 的div,如果有4次传不同的参,就会有4个 class="spa-page spa-page-home" 的div。
from spa.
指同同一路由,即同一页面,如果有不同的传参,根据参数来作出不同的处理,SPA.JS现在是没有对这种场景处理的方法吗?
from spa.
这种情况肯定是支持的,否则路由规则就没有意义了,我怀疑你的代码逻辑有问题,你说打开 home/list1 有内容,那你在回调里拿到 num 的值 1
了么
On Wed, Aug 31, 2016 at 4:17 PM, nicklao [email protected] wrote:
指同同一路由,即同一页面,如果有不同的传参,根据参数来作出不同的处理,SPA.JS现在是没有对这种场景处理的方法吗?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#43 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAhXY6zDvPvm8L-jO9smWII1zGWHbuKlks5qlTi2gaJpZM4JxSRy
.
from spa.
第一次打开 home/list1 的时候回调能正常拿到num的值1,这时候会spa.js会创建一个class="spa-page spa-page-home" 的div
第二次打开 home/list2 的时候 什么都没拿到,这 时候spa.js会创建第二个class="spa-page spa-page-home" 的div
from spa.
等我在docs里写一个demo,到时候你对比试试
from spa.
@zhaoda 不用写了! 我看过demo,又看了一下源码。是有逻辑问题存在! 此issue可以close。
from spa.
Related Issues (20)
- 在页面切换动画完成后能否有事件通知 HOT 2
- $view 这个对象为什么是一个文档数组,而不是一个文档对象 HOT 4
- 页面切换有异常 HOT 8
- 赞
- emulateTransitionEnd扩展函数冲突问题 HOT 1
- 必须要使用requirejs或者seajs模块化方式加载吗? HOT 2
- 在手机端访问weishi.com和PC端访问页面表现形式不一样,请问是如何处理的? HOT 4
- 你好 我想问下咱们这个spa框架可以整合sui么 HOT 1
- hi, 我想尝试 用spa 来做 桌面浏览器的东西,但是发现 hash 的方式在ie11 就失效了,想请问一下 如果我想兼容ie8+ 需要做什么调整 HOT 2
- 请问下怎么在路由后面添加参数,我在hash后面添加参数失败 HOT 13
- -.-..终于抽时间 写了demo 请zhaoda 大大提意见 HOT 4
- 源码中type = 'panle'能否改成type = 'panel'? HOT 1
- 是不是跟fastclick有冲突,用了fastclick发现有些点击,第一次点击无效,第二次才可以点的动? HOT 8
- spa:initpanel 事件的触发不生效 HOT 1
- 初始定位到一个不存在的锚点会无法正确初始化 HOT 3
- 页面多起来后,数据管理有什么好的方式去实现? HOT 13
- 一处拼写错误:event 写成了 evnet HOT 1
- iOS 10+ 没有给内容区域添加 spa-scroll-touch 造成无惯性滚动 HOT 2
- namedParam正则匹配问题
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spa.