Question

I followed all the steps on the Durandal tutorial page but for whatever reason, the widget is not getting bound.

The following line is copied from browser, I am expecting it to be injected with the HTML from the widget.

 <div data-bind="widget: {kind:'dateMonthPicker', DateSubject: DateSubject}"></div>

Using the alternative syntax didn't get me any further either:

 <div data-bind="dateMonthPicker:{DateSubject: DateSubject}"></div>

I have placed the widget in what I believe to be the correct folder:

enter image description here

Also added the following lines to the start up routine:

app.configurePlugins({
    router: true, 
    dialog: true,
    widget: true,
    http: true
});


widget.registerKind('dateMonthPicker');

Any thoughts on what I could be missing? I don't think the code in the widget itself matters, because they are simply not getting called. I put a debugger in the activate line and it didn't even get there. The most frustrating part is probably the lack of error because I don't even know what I could be doing wrong.

Please help.

Était-ce utile?

La solution

Turned out an exception was thrown in the parent ViewModel activation routine.

Exception was swallowed instead of propagated which made debugging it such a challenge.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top