我创建了一个简单的 ng-click 函数,可以隐藏和显示DIV
.
然而,宁可简单地出现和消失,angular是否有能力赋予滑动效果?
这是一个 plunkr:http ://plnkr.co/edit/jbHidL3oOQvi4RBCkJIF?p=preview
HTML:
<div class="grid-wrap">
<div class="grid-col one-third">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<a href="#" class="link" ng-click="showMe=!showMe">Show the slidy section</a>
</div>
<div class="grid-col two-thirds" ng-show="showMe">
My hidden section that i want to slide out
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua</p>
<p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis irure dolor in repr</p>
</div>
</div>