2016-05-26 36 views
0

我想獲得的URL參數與我SSR流量路由器流量路由器SSR參數錯誤

FlowRouter.route("/:lang", { 
    name: "home", 
    action({lang}) { 
    console.log(lang); 
    mount(MainLayout, { 
     content:() => (<Home/>) 
    }); 
    } 
}); 

我不知道爲什麼,但我得到的路線這個錯誤http://localhost:3000/testparam

Error when doing SSR. path:/testparam: Expected "lang" to be defined

帶有「testparam」的我的console.log出現在服務器端控制檯上的錯誤之前。


編輯: 在客戶側的錯誤也出現:

Uncaught TypeError: Expected "lang" to be defined 
+0

它是否也發生沒有SSR? – aedm

回答