javascriptmvc

Authentication for users on a Single Page App?

随声附和 提交于 2019-12-03 01:19:55
问题 I have developed a single page app prototype that is using Backbone on the front end and going to consume from a thin RESTful API on the server for it's data. Coming from heavy server side application development (php and python), I have really enjoyed the new different design approach with a thick client side MVC but am confused on how best to restrict the app to authenticated users who log in. I prefer to have the app itself behind a login and would also like to implement other types of

Authentication for users on a Single Page App?

折月煮酒 提交于 2019-12-02 14:52:05
I have developed a single page app prototype that is using Backbone on the front end and going to consume from a thin RESTful API on the server for it's data. Coming from heavy server side application development (php and python), I have really enjoyed the new different design approach with a thick client side MVC but am confused on how best to restrict the app to authenticated users who log in. I prefer to have the app itself behind a login and would also like to implement other types of logins eventually (openid, fb connect, etc) in addition to the site's native login. I am unclear how this

Failed to execute 'pushState' on 'History' error when using window.history.pushState function

僤鯓⒐⒋嵵緔 提交于 2019-11-28 10:46:49
I'm using window.history in JavascriptMVC application to enable back/forward/refresh functionality for each controller. Every time I load a new controller I'm using window.history.pushState to add a new state to history. And then on back/refresh I'm using the saved state and reuse the data to build the controller again. The whole idea works fine excepting one issue on specific scenario. I'm getting the following error: Failed to execute 'pushState' on 'History': An object could not be cloned. The same data is added without problem on other scenario. What can cause this error? Thanks for the

Failed to execute 'pushState' on 'History' error when using window.history.pushState function

这一生的挚爱 提交于 2019-11-27 02:34:29
问题 I'm using window.history in JavascriptMVC application to enable back/forward/refresh functionality for each controller. Every time I load a new controller I'm using window.history.pushState to add a new state to history. And then on back/refresh I'm using the saved state and reuse the data to build the controller again. The whole idea works fine excepting one issue on specific scenario. I'm getting the following error: Failed to execute 'pushState' on 'History': An object could not be cloned.