Robostagram / Robotagram

The original game that popped out of the attic !
5 stars 0 forks source link

Use javascript routes instead of harcoding URLs #10

Closed tsimbalar closed 12 years ago

tsimbalar commented 12 years ago

There is javascriptRouter in Play 2 that allows to generate a javascript version of the routes defined in the application (http://www.playframework.org/documentation/api/2.0.1/scala/index.html#views.html.helper.javascriptRouter$ ).

This would allow not to break the js code too much whenever we edit the routes of the application.

There is an example of how to use it in the samples that come with Play : ZenTasks https://github.com/playframework/Play20/tree/master/samples/scala/zentasks .