Closed eeroan closed 12 years ago
Thanks for the feedback ! Actually I didn't test yet with Require.js 2. Sad thing if the API is broken... I'll fix it ASAP.
This should help :) I've tested really quick with the demo and it seems OK. Btw, may I know the project, if public, where you're using this plugin ? Thanks again !
Working great! That was fast!
I have bunch of helper functions that are used on templates. Could they be somehow available for templates implicitly? Instead of saying:
myTemplate(_.extend(helperFunctions, {name: 'john'})
I would like to just say:
myTemplate({name: 'john'})
I don't want to put them in global namespace either. Any suggestions for having some configuration hook?
Nice feature request actually, I have the same needs currently and didn't took the time to make it. I'll see what I can do :)
Perhaps having tplHelpers in config could be the right way of passing the default helpers for templates?
require.config({ tplHelpers: {formattedDate: function(date) {...}} })
At least is now req.nameToUrl() has changed to req.toUrl(). And for some reason adding 'tpl!navigation.html' throws error "navigation.js" not found!