I am using Canjs to build my Web application . Now i have a issue while i am working on it.
The controllers get changed on a Single HTML element and the controllers that got attached to that particular element does not get destroyed when the new controller gets attached. So i decided to destroy all the controllers attached to that before I attach something else to it.
I am left with two queries
How do i find the attached controllers on a particular element ? as .controller() doesn't work
How do i call the destroy?
Please help me Thanks in Advance .
If you are using the can.Control.plugin plugin it should be possible to access all the controls on an element by calling
$(element).controls()
.