diff --git a/src/ExternalTemplateSource.js b/src/ExternalTemplateSource.js index 3263d17..3116a4c 100644 --- a/src/ExternalTemplateSource.js +++ b/src/ExternalTemplateSource.js @@ -45,6 +45,14 @@ ko.utils.extend(ExternalTemplateSource.prototype, { self.data("precompiled",null); self.template(tmpl); self.loaded = true; + + if( ko.isWriteableObservable( self.options.loaded ) ) self.options.loaded(true); // this alows to pass a writeable observable to the template binding in order to get notified when the template was loaded + // example: + // + //
+ //
Template was loaded
+ + }); } -}); \ No newline at end of file +});