Documented slightly changed view model registration
Still backwards compatible though!
This commit is contained in:
parent
3a41ec2e20
commit
8b4b5fb058
1 changed files with 4 additions and 4 deletions
|
|
@ -594,8 +594,8 @@ like so:
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is how our plugin registers itself with the application, by adding some configuration
|
// This is how our plugin registers itself with the application, by adding some configuration
|
||||||
// information to the global variable ADDITIONAL_VIEWMODELS
|
// information to the global variable OCTOPRINT_VIEWMODELS
|
||||||
ADDITIONAL_VIEWMODELS.push([
|
OCTOPRINT_VIEWMODELS.push([
|
||||||
// This is the constructor to call for instantiating the plugin
|
// This is the constructor to call for instantiating the plugin
|
||||||
HelloWorldViewModel,
|
HelloWorldViewModel,
|
||||||
|
|
||||||
|
|
@ -604,8 +604,8 @@ like so:
|
||||||
// instantiation via the parameters argument
|
// instantiation via the parameters argument
|
||||||
["settingsViewModel"],
|
["settingsViewModel"],
|
||||||
|
|
||||||
// Finally, this is the list of all elements we want this view model to be bound to.
|
// Finally, this is the list of selectors for all elements we want this view model to be bound to.
|
||||||
[document.getElementById("tab_plugin_helloworld")]
|
["#tab_plugin_helloworld"]
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue