0

I am using ng-show #animation.

index.html: -

<body>
 <div ng-view></div>
</body>

templateURL contains:-

<button ng-init='shw=false', ng-click='shw=!shw;', class='share'> press me </button> 
<div ng-init='shw=false', ng-show='shw', class='animate-show'>

<h1> this is animation showing </h1>
<h2> even in the begining which it should not </h2>

</div>

In the above code the templateURL file should not show or slide up when page loads.

Please view the following two plunkrs.

This is expected behavior

This is the behavior we get when using ngAnimate and ngRoute together.

Sangram Singh
  • 7,161
  • 15
  • 50
  • 79

1 Answers1

4

You can use ng-if in place of ng-show to get your desired animation.

You can checkout this plunker I created using your sample code.

http://plnkr.co/edit/ZzxrwzecaX2yrEcSwvEn?p=preview

Shreyance Jain
  • 914
  • 7
  • 12