Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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