UNPKG

knockout-amd-helpers

Version:

Makes Knockout and AMD modules work better together

10 lines 352 B
define(["knockout"], function(ko) { return function() { this.articlePath = "articles"; this.currentArticle = ko.observable("one"); this.currentArticle.full = ko.computed(function() { var current = this.currentArticle(); return current && this.articlePath + "/" + current; }, this); }; });