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.

Was it helpful?

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top