make new templating system works with r.js