I'm trying to create a slider directive inpired by this example using ngSwitch and ngAnimate but without success. There is a timeout calling the next
function that increments the scope.current
variable and ngSwitch should use this variable to switch images.
<div class="slider">
<img src="..." />
<img src="..." />
<img src="..." />
</div>
Here is my plunker with the example. I think it is something related with the scope(its always you scope).
UPDATE: I did some progress, I moved the attributes manipulation to the compile function and it seems it helped a bit but now I get an error: No controller: ngSwitch
.
new plunker