andyet/ICanHaz.js — Issue #39: Able to specify template name and data through function.
Author: aidanmorgan
Created: 2011-12-30 14:47:18+00:00
State: open

Hi,

First of all I love ICH, it works really nicely.

I'm sorry if I missed this somewhere from scanning through the code but I think it would be really helpful to be able to call a function and give it the name of the template and the data that I wish to use.

I am trying to write some custom helper code for something I am working on, and I have the template name and the url to load data from embedded in the DOM as such:

```html

```

When I want to load the contents of the div, I can access the data-url and data-template attributes and use jQuery to load the data, however I have no way to get ICH to render the template for me.. Ideally what I need is an ich.render(template, data); function that I could call so I can programatically use the templates.

Cheers,

Aidan