Hi everyone, I am doing my first steps in knockoutJs and I like it so
far.
Here is my problem, I have a form which has the submit binding is
bound to an function in the viewmodel. Yesterday we decide that we
need to show a confirmation dialog, before doing the ajax post.
A-So, my first question is conceptually speaking, if a "confirmation
dialog" is a view concern or a viewmodel concern?
My thoughts on this, is that it is a presentation concern so I tried
to keep this out from my viewmodel-
And I decide to do something like this
http://jsfiddle.net/fNCBa/7/
(it is not working) instead of doing
data-bind="submit: save...",
I am doing:
data-bind="confirmAndSubmit: {template: '#MyConfirmTemplate', data:
items, submit: save}"
B-Does this seems right?
C-If this is right, is there a way I can use knockout template engine
from my code.. to render the content of the dialog?
D-If this doesn't seem right, how would you do it?
Thank you very much!