samedi 21 février 2015

ng-if ng-include angular.html not working


Vote count:

0




i want to prevent carousel download images until caurosel button is clicked


version with ng-if when i click carousel it comes without images



<button ng-click=" visSlide=false" > thumbnails </button >
<button ng-click=" visSlide=true" > carousel</button >

<div ng-if="!visSlide" ng-include src="'_thumbnails.html'"> </div>

<div ng-if="visSlide" >
<div ng-include src="'_carousel.html'"> </div>
</div>

</div>


_


version with ng-show when i click carousel comes with images

but it loads both thumbnail and carousel images regardless of visSlide bool value. ( saw it in firebug net tab )



<div ng-show="!visSlide" ng-include src="'_thumbnails.html'"> </div>
<div ng-show="visSlide" ng-include src="'_carousel.html'"> </div>
<div ng-if="visSlide" >
<div ng-include src="'_carousel.html'"> </div>
</div>

</div>


asked 25 secs ago







ng-if ng-include angular.html not working

Aucun commentaire:

Enregistrer un commentaire