js-signals icon indicating copy to clipboard operation
js-signals copied to clipboard

_bindings is empty although signal is added

Open Teflo opened this issue 9 years ago • 1 comments

I really don't know why, but I can't dispatch any signals anymore because it says there are no bindings, although they're denfinitly there. Look at this screenshot: image You can see self and this is not referring to the same object. While this._bindings.length is 1, self._bindings.length is 0, so it doesn't call anything.

It worked for me before, so I don't know what I made wrong. I clearly think the problem is on my side, but I don't get why this behaviour comes up.

My binding looks like this: if(!ng.Templates[name].loaded) { ng.Templates[name].onLoaded.add(function(template) { //this code is never called template.create(); }); ng.Templates[name].load(); }

Teflo avatar Feb 27 '16 19:02 Teflo

its normal "this" to refer to window in your case. you are not binding the function to "self" you'd better check your repo-history

thesunlover avatar Feb 29 '16 06:02 thesunlover