Domanda

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

  1. How do i find the attached controllers on a particular element ? as .controller() doesn't work

  2. How do i call the destroy?

Please help me Thanks in Advance .

È stato utile?

Soluzione

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().

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top