Notice: The Monaca & Onsen UI Community Forum is shutting down.

For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.

Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.

Background item list not work after update Onsen v1 to v2



  • Hi!
    I am updating an application with Onsen v1 to v2. Before update my app, when click a item on list, the background of this item changed.

    <ons-list-item class="item-res-mon" ng-click="select(monitor)" ng-style="monitor.style" ng-show="monitor.show" ng-repeat="monitor in monitors" tappable>
    	<div class="img-res-monitor">
    		<div class="img-circle" style="background-image: url({{monitor.imagen}})"></div>
    	</div>
    	<div class="text-res-monitor">
    		<div class="nombre-res-monitor">
    			<span>{{monitor.nombre}}</span>
    		</div>
    		<div class="esp-res-monitor">
    			<span>{{monitor.info}}</span>
    		</div>
    	</div>
    </ons-list-item>
    

    monitor.style return {‘background’: ‘none’}; if deselect and {‘background’: ‘white’}; if clicked. In onsen v1 work perfectly but in onsen v2 not work.

    I think the problem is in the transitions. When ng-style tries to put the background, the tappable transition removes it. If I remove the tappable attribute, it does not work either.
    How can I continue using my onsen v1 logic on onsen v2?
    Thanks a lot!!



  • I have the same problem