matiwinnetou / spring-soy-view

Google Closure Templates integration with Spring MVC
Apache License 2.0
16 stars 9 forks source link

SoyAjaxController: provide support for namespace #21

Open matiwinnetou opened 11 years ago

matiwinnetou commented 11 years ago

As our frontend dev said it would be good if compiled templates supported requirejs or even without requirejs one could wrap them inside another function to limit the namespace. This is important because it will not register compiled files as global java functions which is not very good in terms of performance and also could lead to name collisions.

Example call when feature is available: www.domain.com/soy/hash/index?namespace=myNamespace

and the output js will be wrapped inside a var myNamespace = function() { }

matiwinnetou commented 11 years ago

I need to learn more about requirejs in order to implement this

matiwinnetou commented 11 years ago

Speak with Uwe about this because I think library supports namespaces based on soy namespace