update root binding for HTML

25 views
Skip to first unread message

Max Max

unread,
Sep 4, 2012, 2:49:37 PM9/4/12
to knock...@googlegroups.com
Hi!
I have html page, with menu bar, which items bound to ko.observableArray.
Now I have 2 controllers, each one has own viewModels (root ko objesct).
Only one controller active for the html page at the time and all html page elements are bound to the data via viewModel of this controller.

All elements of the page are regenrated when contoller is changed, but menu bar stay as is (shared for both controllers), while behaviour of all regenrated html elements expected, the menu bar behave stragenly, each time when I switched between 
controllers it double elements on the bar menu.

There is some sinplistic example of the case (but here,wired, elements not doubled but dissapear)

There could be problem?
Thanks
Reply all
Reply to author
Forward
0 new messages