AndreyAkinshin / knockout-mvc

Power of Knockout.js for ASP.NET MVC
http://knockoutmvc.com
203 stars 125 forks source link

Redirect to url #35

Closed drvic10k closed 11 years ago

drvic10k commented 11 years ago

This enables to redirect after data has been posted to server. The controller has to return a serialized object with following properties: redirect=true, url="url/to/redirect/to"

I had to modify the ConvertData method to ignore anonymous types.

Also added a function for resolving rooted urls.

There's another way to do this without modifying the ConvertData method and that is to create a class with redirect and url properties and return serialized object of this class.

AndreyAkinshin commented 11 years ago

Thanks!