Closed mikenikles closed 12 years ago
Thanks Mike. I thought it was harmless. Care to show a snippet that shows the problem?
Sure, I've got a _routes.html tag in _tags. It follows the suggestion found at http://stackoverflow.com/questions/4209420/play-framework-best-practice-to-use-urls-in-separate-javascript-files.
With the semicolon in place, I got the following js output:
var routes = {
indexRoute: function(options) { var pattern = '/'; for(key in options) { pattern = pattern.replace(':'+key, options[key]); } return pattern; };,
anotherRoute: function(options) { var pattern = '/another'; for(key in options) { pattern = pattern.replace(':'+key, options[key]); } return pattern; };
}
Cheers,
Mike
It's obvious. Thanks Mike!
2012/1/18 Agile Consulting < reply@reply.github.com
Sure, I've got a _routes.html tag in _tags. It follows the suggestion found at http://stackoverflow.com/questions/4209420/play-framework-best-practice-to-use-urls-in-separate-javascript-files .
With the semicolon in place, I got the following js output:
var routes = { indexRoute: function(options) { var pattern = '/'; for(key in options) { pattern = pattern.replace(':'+key, options[key]); } return pattern; };, anotherRoute: function(options) { var pattern = '/another'; for(key in options) { pattern = pattern.replace(':'+key, options[key]); } return pattern; }; }
Cheers,
Mike
Reply to this email directly or view it on GitHub: https://github.com/branaway/Japid/pull/41#issuecomment-3533393
Hi,
There seems to be an invalid semicolon that causes javascript exceptions. In particular, "Uncaught SyntaxError: Unexpected token ;"
Cheers,
Mike