Javascript / JQuery events vs knockout observable + subscribe -


is there programming scenario js / jquery events need used while using knockoutjs observable variables?

technically, no, can use ko.utils.registereventhandler instead, more technically, that's using js events.

more point (i hope), may apply jquery events within binding handler, should not doing in other app code. reason should not reaching around knockout's binding handlers manipulate view directly. binding handlers exist synchronize view , viewmodel. want view should done manipulating viewmodel. if there no way modify or access view in way want via viewmodel, need binding handler.

within binding handler, objective ensure viewmodel , view reflect each other. may use tools achieve that.

also note knockout provides event binding let viewmodel respond events view.


Comments

Popular posts from this blog

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

html - Outlook 2010 Anchor (url/address/link) -

android - How to create dynamically Fragment pager adapter -