rniemeyer/knockout-amd-helpers — pull request #20 by tkambler (2014-04-29 14:54:24+00:00)
Title: Added support for pulling the template from a module's  "template" property.

With the following PR, a module is checked for a `template` property (of type 'string' or 'function'). In the event that such a property exists, the value of that property will serve as the source of the module's template.

I tend to prefer packaging any given module's template(s) directly with that module, as opposed to placing them within a single, global "/templates" folder. With this in place, a module can be self-aware of its template. For example:

```html

```

```javascript
define(function(require) {
var template = require('text!./templates/template.tpl');
var Cat = function() {
'template': template
};
return Cat;
});
```

Thoughts?