Skip to content

Instantly share code, notes, and snippets.

@nachopants
Created September 7, 2016 02:52
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 nachopants/31a5e695935b886cfd941feb59f5e4c7 to your computer and use it in GitHub Desktop.
Save nachopants/31a5e695935b886cfd941feb59f5e4c7 to your computer and use it in GitHub Desktop.
var appModel = function () {
var self = this;
this.myVar = ko.observable('kebab');
this.module = ko.observable(new module(self));
}
var module = function (parent) {
var self = this;
this.widget = ko.observable(new widget(self));
}
var widget = function (parent) {
var self = this;
this.var = ko.observable(parent.parent.myVar());
this.var = ko.observable(parent.parent().myVar());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment