Skip to content

Instantly share code, notes, and snippets.

@devdays
Created December 16, 2014 20:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save devdays/505e19868b9938ce87e9 to your computer and use it in GitHub Desktop.
Save devdays/505e19868b9938ce87e9 to your computer and use it in GitHub Desktop.
Object JavaScript - External Template Engine file in ./templates folder
$(function () {
infuser.defaults.templateUrl = "./templates";
function ViewModel() {
this.productArray = ko.observableArray([
{ product: "Widget", type: "Tool" },
{ product: "Bolt", type: "Fastener" },
{ product: "Washer", type: "Fastener" },
{ product: "Screwdriver", type: "Tool" }
]);
}
ko.applyBindings(new ViewModel());
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment